cramer@kontron.UUCP (Clayton Cramer) (11/06/86)
We have found what appears to be a compatibility problem with the Compaq 386 and EGA 43-line mode. The following two functions are responsible for setting EGA 43-line mode and restoring the normal 25-line mode. Set43LineMode(Color) { union REGS InRegs, OutRegs; if (Color) InRegs.h.al = 0x3; /* Color, 80x25 */ else InRegs.h.al = 0x7; /* Monochrome, 80x25 */ int86 (0x10, &InRegs, &OutRegs); InRegs.x.ax = 0x1112; /* character generator BIOS routine */ InRegs.h.bl = 0; /* load 8x8 double dot character font */ int86 (0x10, &InRegs, &OutRegs); InRegs.x.ax = 0x1200; /* alternate screen routine */ InRegs.h.bl = 0x20; /* alternate print screen routine */ int86 (0x10, &InRegs, &OutRegs); } Reset43LineMode(Color) { union REGS InRegs, OutRegs; if (Color) InRegs.h.al = 0x3; /* Color, 80x25 */ else InRegs.h.al = 0x7; /* Monochrome, 80x25 */ int86 (0x10, &InRegs, &OutRegs); InRegs.x.ax = 0x1101; /* character generator BIOS routine */ InRegs.h.bl = 0; /* load 8x8 double dot character font */ int86 (0x10, &InRegs, &OutRegs); InRegs.x.ax = 0x1200; /* alternate screen routine */ InRegs.h.bl = 0x20; /* alternate print screen routine */ int86 (0x10, &InRegs, &OutRegs); } On an IBM AT with IBM EGA board, these functions work perfectly -- the first puts us in 43-line mode, the second puts us back in 25-line mode. With the same IBM EGA board installed in a Compaq Deskpro 386, the first function works perfectly, and the second function gives us full-height characters again, but PC-DOS seems to writing 43-lines of data to the screen! The symptom is that the bottom of the screen is invisible. Using a CLS command in PC-DOS puts us back at the top of the screen, but commands that produce more than 25 lines of text don't start scrolling until 43 lines have been written. To further confuse matters, using Microsoft's CodeView in 43-line mode works just fine -- into 43-line mode when you start it, and back to 25-line mode when finished. Using the PC-DOS command MODE CO80 puts everything back to 25-line mode. Is there a compatibilty problem, or have I missed some step in restoring 25-line mode that just happens to work on the AT? Clayton E. Cramer