Bret Robinson
b...@melb.bull.oz.au
--
| Bret Robinson, Snr. Software Engineer | Phone: 61 3 4200490 |
| Technical Support Group (Unix/Mac/HVS/DSA) | Fax: 61 3 4200445 |
| Melbourne Development Centre, Bull HN Aust. | b...@melb.bull.oz.au |
--
| Bret Robinson, Snr. Software Engineer | Phone: 61 3 4200490 |
| Technical Support Group (Unix/Mac/HVS/DSA) | Fax: 61 3 4200445 |
| Melbourne Development Centre, Bull HN Aust. | b...@melb.bull.oz.au |
I use assembly for most of my hardward I/O. To change to 43/50 line mode
you need to make a BIOS call. In TURBO C you can use the "asm" command:
/* set to 50 lines */
asm {
/* IBM ROM BIOS book by Ray Duncan suggests you set video
mode before changing fonts */
mov ah,0h /* set video mode */
mov al,3h /* 80x25 16colors text */
int 10h /* make BIOS call */
/* now change from 80x25 to 80x50 */
mov ah,11h /* load EGA/VGA font */
mov al,12h /* 8x8 font, which is 50 lines */
mov bl,0h /* select 1st font block */
int 10h /* make BIOS call */
}
To change to a 8x14 font (43lines) change the 12h to a 11h. You can also
write the above in your favorite assembler and link the .obj into your C
program. To read the number of lines in the current video mode you might
try BIOS function 10H subfunction 30H, I've never had the need to read
the video mode since I'm usually the one who sets it. TURBO C has a build
in function to determine and save the current mode so that you can reset
that mode when your program exits.