home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap14 / lines43.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-07  |  591 b   |  25 lines

  1. /* lines43.c -- leaves EGA in 43-line mode */
  2.  
  3. #include <dos.h>
  4. #include <conio.h>
  5. #define VIDEO 0x10
  6. #define SETVMODE 0
  7. #define CHAR_GEN 0x11   /* an EGA BIOS function number */
  8. #define ROM8X8   0x12
  9. #define BLOCK 0
  10. #define TEXTC80 3
  11.  
  12. main()
  13. {
  14.      union REGS reg;
  15.  
  16.      reg.h.ah = SETVMODE;    /* set text mode */
  17.      reg.h.al = TEXTC80;
  18.      int86(VIDEO, ®, ®);
  19.  
  20.      reg.h.ah = CHAR_GEN;   /* char generator routine */
  21.      reg.h.al = ROM8X8;  /* use 8x8 ROM character box */
  22.      reg.h.bl = BLOCK;   /* copy to block 0 */
  23.      int86(VIDEO, ®, ®);
  24. }
  25.