home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn0bh.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  879 b   |  17 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;             Function 0BH: Check Keyboard Status            ;
  4.         ;                                                            ;
  5.         ;             int key_ready()                                ;
  6.         ;                                                            ;
  7.         ;             Returns 1 if key is ready, 0 if not.           ;
  8.         ;                                                            ;
  9.         ;************************************************************;
  10.  
  11. cProc   key_ready,PUBLIC
  12. cBegin
  13.         mov     ah,0bh          ; Set function code.
  14.         int     21h             ; Ask MS-DOS if key is available.
  15.         and     ax,0001h        ; Keep least significant bit only.
  16. cEnd
  17.