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

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