home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 1.ddi / OOPWLD.ZIP / SHAPES / KEYREAD.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-31  |  273 b   |  15 lines

  1. #include <stdio.h>
  2. #include <bios.h>
  3.  
  4. int main(void)
  5. {
  6.    char ch;
  7.    while(1) {
  8.      printf("Input a character:");
  9.      while(!bioskey(1));
  10.      int key = bioskey(0);
  11.      printf("key = 0x%x\n", key);
  12.      if(key == 0x11b) return 0; // escape to quit
  13.    }
  14. }
  15.