more Hercules exit graphics mode issues...

Jim Morton jim at applix.UUCP
Wed Oct 19 02:21:47 AEST 1988


Under Xenix 2.2.2 and 2.2.3, once you put the console into Hercules
graphics mode, you had to return to text mode using ioctl(SW_MCAMODE)
which is documented as "reset the monochrome adapter". Under 2.3,
this will fail, instead you have to use ioctl(SW_B80x25), which would
fail under 2.2.2/2.2.3. So if you are writing code to do this, to be
portable among 2.2 and 2.3, you should either:

    1) try ioctl(SW_MCAMODE), if it fails with -1 try ioctl(SW_B80x25)
		or
    2) use the cleaner but more verbose method of
	ioctl(CONS_CURRENT)
	if (MONO)
		ioctl(MCA_GET)
	....
	ioctl([reset with results of MCA_GET])

--
Jim Morton, APPLiX Inc., Westboro, MA
UUCP: ...harvard!m2c!applix!jim
      jim at applix.m2c.org



More information about the Comp.unix.xenix mailing list