home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / examples / other / bioskey.c__ next >
Encoding:
Text File  |  1993-11-28  |  590 b   |  27 lines

  1. /*
  2.     NAME:  BIOSKEY.C--
  3.     DESCRIPTION:  Small and simple demo program.
  4.     RUN FILE SIZE:  277 bytes.
  5. */
  6.  
  7.  
  8. ?include "KEYCODES.H--"
  9. ?include "WRITE.H--"
  10.  
  11. word keycode;
  12.  
  13. main ()
  14. {
  15. WRITESTR("Press <ESC> to quit, any other key for BIOS scan code.\n");
  16. do { 
  17.      keycode = @BIOSREADKEY();
  18.      WRITEWORD(DSBYTE[#keycode+1]);   // print high byte
  19.      WRITE(' ');
  20.      WRITEWORD(DSBYTE[#keycode]);     // print low byte
  21.      WRITE(' ');
  22.      WRITEWORD(keycode);              // print word
  23.      WRITELN();
  24.     } while( keycode != k_esc );
  25. }
  26.  
  27. /* end of BIOSKEY.C-- */