home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / bbs / mikes30c.arc / CHRPUT.C next >
Text File  |  1985-09-25  |  520b  |  29 lines

  1. chr_put(c)    /* Put character with attribute in first 8 bits of int */
  2. int    c;       /* and character in last 8 bits */
  3. {
  4.     union REGS REG;
  5.  
  6.     REG.h.ah = 0x9;
  7.     REG.h.al = c;
  8.     REG.h.bl = c >> 8;
  9.     REG.h.bh = 00;
  10.     REG.x.cx = 1;
  11.     int86(0x10, ®, ®);
  12.  
  13.     return(REG.x.ax);
  14.  
  15. }
  16.  
  17. chr_get()   /* Get character with attribute returns 2byte int used above */
  18. {
  19.     union REGS REG;
  20.  
  21.     REG.h.ah = 0x8;
  22.     REG.h.bh = 00;
  23.     int86(0x10, ®, ®);
  24.  
  25.     return(REG.x.ax);
  26.  
  27. }
  28.  
  29.