2000-05-28 13:40:48 +00:00
|
|
|
;
|
2003-12-21 18:43:25 +00:00
|
|
|
; Ullrich von Bassewitz, 06.08.1998
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
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
|
2003-12-21 18:43:25 +00:00
|
|
|
.import keyidx: zp
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
.proc _kbhit
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
ldx #0 ; High byte of return is always zero
|
2013-05-09 11:56:54 +00:00
|
|
|
lda keyidx ; 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
|
|
|
|
|
|
|
|
|
|
|
|