ReC98/libs/BorlandC/kbhit.asm

21 lines
209 B
NASM

; int kbhit(void)
public _kbhit
_kbhit proc
push si
push di
cmp _cFlag, 0
jz short @@do
mov ax, 1
jmp short @@ret
@@do:
mov ah, 0Bh
int 21h
cbw
@@ret:
pop di
pop si
ret
_kbhit endp