home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap13 / scrn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-07  |  1.5 KB  |  52 lines

  1. /* scrn.h -- header file for BIOS video I/O functions */
  2. /*           contained in scrfun.c and scrfun.lib     */
  3. #define VIDEO 0x10
  4. #define SETMODE 0
  5. #define SETCURSOR 2
  6. #define GETCURSOR 3
  7. #define SETPAGE 5
  8. #define SCROLL 6
  9. #define READCHATR 8
  10. #define WRITECHATR 9
  11. #define GETMODE 15
  12. #define NORMAL 0x7
  13. #define VIDREV 0x70
  14. #define INTENSE 0x8
  15. #define BLINK  0x80
  16. #define COLS 80
  17. #define ROWS 25
  18. #define TEXTBW80 2
  19. #define TEXTC80 3
  20. #define TEXTMONO 7
  21.  
  22.  
  23. void Clearscr(void),
  24.      Setvmode(unsigned char),
  25.      Setpage(unsigned char),
  26.      Setcurs(unsigned char, unsigned char,
  27.              unsigned char),
  28.      Read_ch_atr(unsigned char *, unsigned char *,
  29.                  unsigned char),
  30.      Write_ch_atr(unsigned char, unsigned char,
  31.                   unsigned char, unsigned int),
  32.      Rewrite(unsigned char, unsigned char),
  33.      Getcurs(unsigned char *, unsigned char *,
  34.              unsigned char);
  35.  
  36. unsigned char Getvmode(void),
  37.               Getpage(void),
  38.               Curslt_lim(unsigned char),
  39.               Cursrt_lim(unsigned char),
  40.               Cursup_lim(unsigned char),
  41.               Cursdn_lim(unsigned char);
  42.  
  43. /* macro definitions */
  44.  
  45. #define Home()        Setcurs(0, 0, Getpage())
  46. /* the next four macros set cursor limits to the      */
  47. /* full screen                                        */
  48. #define Curslt()      Curslt_lim(0)
  49. #define Cursrt()      Cursrt_lim(COLS - 1)
  50. #define Cursdn()      Cursdn_lim(ROWS - 1)
  51. #define Cursup()      Cursup_lim(0)
  52.