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

Solved ^^

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

clearkeyboardbuffer		endp

Really helpfull
You saved a programmer from death tonight :)
Thanks jaloonz

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.