Path: utzoo!attcan!uunet!husc6!m2c!applix!jim From: jim@applix.UUCP (Jim Morton) Newsgroups: comp.unix.xenix Subject: more Hercules exit graphics mode issues... Keywords: MCAMODE Hercules Message-ID: <824@applix.UUCP> Date: 18 Oct 88 16:21:47 GMT Organization: APPLiX Inc., Westboro MA Lines: 20 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@applix.m2c.org