INT 16.01 should retrieve the keystroke from the keyboard buffer and also clear it from the buffer. You may be doing something wrong in your testing. Here's some code I have in several of my programs (the > is use in my assembler (A86) to indicate a forward label reference):
;------------------------------------------------------------------------------
;FLUSH KEYBOARD BUFFER
;Inputs:
;Outputs:
;Changes: Flushes the Keyboard Buffer
;------------------------------------------------------------------------------
FlushKbdBuff:
PUSH AX ;Save used registers
F10: ;Loop to here for each key
CALL GetKey ;Get a key from the keyboard buffer
JNZ F10 ;If there was one, get another
POP AX ;Restore used registers
RET
;------------------------------------------------------------------------------
;READ CHARACTER FROM THE KEYBOARD BUFFER
;Inputs:
;Outputs: AH = Keyboard scan code
; AL = ASCII value of keypress (0 if extended ASCII)
; AX = 0 if no key is waiting
;Changes: ZF = Set if no key in buffer (AX = 0)
; = Clear if a key was found (AX = key)
;------------------------------------------------------------------------------
GetKey:
MOV AH,1 ;Service 1 (Keystroke waiting?)
INT 16h ;Do It
JZ >K10 ;If no key waiting, we're done
XOR AH,AH ;If a key is waiting, service 0 (Get keystroke)
INT 16h ;Do It
JMP >K90 ;We're done
K10: ;No keystroke waiting
XOR AX,AX ;Make sure AX=0
K90: ;We're done
OR AX,AX ;Set the found/not found flag
RET