954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to clear keyboard buffer?

My question is clear ^^
How to clear keyboard buffer?

eeeraser
Newbie Poster
22 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Solved ^^

eeeraser
Newbie Poster
22 posts since Apr 2007
Reputation Points: 10
Solved Threads: 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
JaLooNz
Newbie Poster
1 post since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: