Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: fprintf() and using under graphic modes Date: Tue, 23 Nov 1999 14:39:33 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Reply-To: djgpp AT delorie DOT com Eli Zaretskii writes: > If your BIOS supports text output in the graphics > mode you are using, it will work. Yup. But in my experience only about 50% of VESA implementations have that support, so it is a bad thing to rely on. > One way of telling if the particular mode is supported by the BIOS is > to call the DJGPP functions ScreenRows() and ScreenCols() and compare > their results with the number of text rows and columns for the > graphics mode you switched into (which you need to know in advance). I think it would be more robust to read this directly from the VESA driver: this can be found in the mode information structure, where the ModeAttributes field will have bit 2 set if TTY output is available. As a quick test, run the Allegro "vesainfo -v" program, and see whether it prints "tty" as part of the ModeAttributes value for the resolution you are interested in. Shawn Hargreaves.