home *** CD-ROM | disk | FTP | other *** search
- TITLE MACHIO - Machine-dependent I/O support for MOUSETST
- PAGE 56,132
-
- ;=============================================================================
- ;
- ; kb.asm
- ;
- ; Module for mouse test utility
- ;
- ; Copyright (c) 1988-1989, Microsoft Corporation. All rights reserved.
- ;
- ; This program contains the machine-specific I/O functions
- ; needed to support the mouse test program.
- ;
- ;=============================================================================
-
- ;
- ; I N C L U D E S
- ;
-
- INCLUDE ASM.INC
-
- PUBLIC _ClearKB
-
- ASSUME CS:@curseg, DS:DGROUP
-
- _ClearKB PROC
-
- C_ENTRY
- mov ah,1 ; Test Keyboard buffer
- int 16h ; Any char in buffer?
- jz CKBRet ; No char in the buffer
-
- CKB1:
- xor ax,ax ; Yes, get it out and forget about it
- int 16h
- mov ah,1 ; Check buffer again?
- int 16h
- jnz CKB1 ; Yes, there are more...
-
- CKBRet:
-
- C_EXIT
- ret ; Return to caller
-
- _ClearKB ENDP
-
- END
-