Category : C Source Code
Archive   : HERC-C.ZIP
Filename : KBKEY.ASM

 
Output of file : KBKEY.ASM contained in archive : HERC-C.ZIP
; C CALLABLE MACRO ASSEMBLER FUNCTION
; Test keyboard buffer for key hit. EG: int kbkey(void);
; On return 0 = NO and 1 = YES.

name kbkey

public _kbkey

DGROUP group _DATA
assume ds:DGROUP

_DATA segment word public 'DATA'
_DATA ends


_TEXT segment byte public 'CODE'
assume cs:_TEXT

_kbkey proc near
push bp
mov bp, sp
mov ah, 1 ; Test kb buffer status
int 16h
mov ax, 0
jz short kbexit ; kb_buff is empty
mov ax, 1 ; char(s) in buffer
kbexit: mov sp, bp
pop bp
ret
_kbkey endp

_TEXT ends
end



  3 Responses to “Category : C Source Code
Archive   : HERC-C.ZIP
Filename : KBKEY.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/