2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 06.08.1998
|
|
|
|
;
|
2009-11-24 18:31:16 +00:00
|
|
|
; unsigned char kbhit (void);
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _kbhit
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "c64.inc"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
|
|
|
|
.proc _kbhit
|
|
|
|
|
|
|
|
ldx #0 ; High byte of return is always zero
|
2013-05-09 11:56:54 +00:00
|
|
|
lda KEY_COUNT ; Get number of characters
|
2009-11-24 18:31:16 +00:00
|
|
|
beq L9
|
|
|
|
lda #1
|
|
|
|
L9: rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
.endproc
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|