Hi!
24-Окт-2004 20:23 [EMAIL PROTECTED] (Joe Cosentino) wrote to "FreeDOS
Devel" <[EMAIL PROTECTED]>:
>> Ah, yes, I see: "Displays the maximum number of lines possible for the
>> monitor you are using" means set highest mode. This is very easy operation:
>> just select 8x8 font (INT10/1112 on EGA/VGA; on CGA you anyway can't change
>> count of lines).
JC> If you'd like to submit a code snippet Arkady, please do....
Pseudocode:
______________O\_/_________________________________\_/O______________
bool EVGApresent () {
/* To see if you are running on an EGA, use INT 10H 12H BL=10H.
If on return, BL>4 then the EGA BIOS is not present,
so you must be running on a CGA or MDA.
*/
call_int_10h (AH=12h, BL=10h);
return BL < 4;
}
if (sethighmode && EVGApresent ()) {
call_int_10h (AX=1112h, BL=0); /* activate 8x8 font */
}
_____________________________________________________________________
O/~\ /~\O
There may be useful to preserve current video state and restore it on exit.
In this case:
______________O\_/_________________________________\_/O______________
unsigned restoremode = 0;
if (sethighmode && EVGApresent ()) {
restoremode = (word FAR*) MK_FP (0, 485h);
if (restoremode <= 8) restoremode = 0x1112; /* 8x8 font */
else if (restoremode <= 14) restoremode = 0x1111; /* 8x14 font */
else restoremode = 0x1114; /* 8x16 font */
call_int_10h (AX=1112h, BL=0); /* activate 8x8 font */
}
....
onexit:
unsigned
if (restoremode != 0) {
call_int_10h (AX=restoremode, BL=0); /* reactivate previous font */
}
_____________________________________________________________________
O/~\ /~\O
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel