;       SCCSID = @(#)kbdflsh.asm	6.1 91/02/15
;      SCCSID = @(#)kbdflsh.asm	6.2 90/01/22
; ****************************************************************************
; *									     *
; *			  IBM/Microsoft Confidential			     *
; *									     *
; *		    Copyright (c) IBM Corporation  1987, 1990		     *
; *		    Copyright (c) Microsoft Corp.  1987, 1990		     *
; *			      All Rights Reserved			     *
; *									     *
; ****************************************************************************
	Page	60,132
;/*************** START OF SPECIFICATIONS ******************************/
;/*								       */
;/* SUBROUTINE NAME:  KbdFlushBuffer				       */
;/*								       */
;/* DESCRIPTIVE NAME:  Keyboard Flush Buffer			       */
;/*								       */
;/* FUNCTION:  Flush the keyboard input buffer.			       */
;/*								       */
;/* NOTES:  KbdHandle is ignored for Version 1.0.		       */
;/*								       */
;/* ENTRY POINT:						       */
;/*	    LINKAGE:  EXTRN KbdRegister:FAR			       */
;/*								       */
;/* INPUT:	      push WORD KbdHandle			       */
;/*		      call KbdRegister				       */
;/*								       */
;/* EXIT-NORMAL:  AX = 0					       */
;/*								       */
;/* EXIT-ERROR:	 none						       */
;/*								       */
;/* EFFECTS:							       */
;/*								       */
;/* INTERNAL REFERENCES:					       */
;/*    ROUTINES:						       */
;/*								       */
;/* EXTERNAL REFERENCES:					       */
;/*    ROUTINES:						       */
;/*								       */
;/*************** END OF SPECIFICATIONS ********************************/

; stack frame:
; +0	ip
; +2	cs
; +4	kbdhandle

DSEG	SEGMENT BYTE	PUBLIC	'DATA'

DSEG	ENDS


	PUBLIC	KBDFLUSHBUFFER

_TEXT	segment byte public 'CODE'
	assume	CS:_TEXT,DS:NOTHING

KBDFLUSHBUFFER	PROC	FAR

		mov	ax,0C00H		; clear keyboard buffer
		int	21h			; pc/dos call
		xor	ax,ax			; no error code returned
		ret	2

KBDFLUSHBUFFER	ENDP

_TEXT	ends
	END
