home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / 05oslib / bios / writeca.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  555 b   |  27 lines

  1. /*
  2.  *    writeca -- write character and attribute to the screen
  3.  */
  4.  
  5. #include <dos.h>
  6. #include <local\std.h>
  7. #include <local\bioslib.h>
  8.  
  9. int
  10. writeca(ch, attr, count, pg)
  11. unsigned char ch;    /* character */
  12. unsigned char attr;    /* attribute */
  13. int count;        /* number of repetitions */
  14. int pg;            /* screen page for writes */
  15. {
  16.     union REGS inregs, outregs;
  17.  
  18.     inregs.h.ah = WRITE_CHAR_ATTR;
  19.     inregs.h.al = ch;
  20.     inregs.h.bh = pg;
  21.     inregs.h.bl = attr;
  22.     inregs.x.cx = count;
  23.     int86(VIDEO_IO, &inregs, &outregs);
  24.  
  25.     return (outregs.x.cflag);
  26. }
  27.