home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MSMOUSE2.ZIP / UTILS.ZIP / KB.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-02-10  |  938 b   |  49 lines

  1.     TITLE    MACHIO - Machine-dependent I/O support for MOUSETST
  2.     PAGE    56,132
  3.  
  4. ;=============================================================================
  5. ;
  6. ; kb.asm
  7. ;
  8. ; Module for mouse test utility
  9. ;
  10. ; Copyright (c) 1988-1989, Microsoft Corporation.  All rights reserved.
  11. ;
  12. ;    This program contains the machine-specific I/O functions
  13. ;    needed to support the mouse test program.
  14. ;
  15. ;=============================================================================
  16.  
  17. ;
  18. ; I N C L U D E S
  19. ;
  20.  
  21.     INCLUDE    ASM.INC
  22.  
  23.     PUBLIC    _ClearKB
  24.  
  25.     ASSUME    CS:@curseg, DS:DGROUP
  26.  
  27. _ClearKB    PROC
  28.  
  29.     C_ENTRY
  30.     mov    ah,1            ; Test Keyboard buffer
  31.     int    16h            ; Any char in buffer?
  32.     jz    CKBRet            ; No char in the buffer
  33.  
  34. CKB1:
  35.     xor    ax,ax            ; Yes, get it out and forget about it
  36.     int    16h
  37.     mov    ah,1            ; Check buffer again?
  38.     int    16h
  39.     jnz    CKB1            ; Yes, there are more...
  40.  
  41. CKBRet:
  42.  
  43.     C_EXIT
  44.     ret                ; Return to caller
  45.  
  46. _ClearKB    ENDP
  47.  
  48.     END
  49.