3
Contributors
3
Replies
12
Views
10 Years
Discussion Span
Last Post by Erfan_1
0

Seems like nobody really encounter this problem except me, but here goes the piece of code to clear the keyboard buffer by directly writing the starting and endpoint of the keyboard buffer start and end.

;--------------------------------------------------------------------------
; clears keyboard buffer
;--------------------------------------------------------------------------
clearkeyboardbuffer		proc	near

	push		ax
	push		es
	mov		ax, 0000h
	mov		es, ax
	mov		es:[041ah], 041eh
	mov		es:[041ch], 041eh				; Clears keyboard buffer
	pop		es
	pop		ax

	ret
clearkeyboardbuffer		endp

Edited by JaLooNz: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.