2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 18.08.1998
|
|
|
|
;
|
2009-11-24 18:31:16 +00:00
|
|
|
; unsigned char kbhit (void);
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
.export _kbhit
|
|
|
|
|
|
|
|
.include "c128.inc"
|
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
|
|
|
|
.proc _kbhit
|
|
|
|
|
|
|
|
ldx #0 ; High byte of return is always zero
|
2000-05-28 13:40:48 +00:00
|
|
|
lda KEY_COUNT ; Get number of characters
|
|
|
|
; ora FKEY_COUNT ; Or with number of chars from function keys
|
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
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-24 18:31:16 +00:00
|
|
|
|