blob: c75b00c907c4ff5af24e044f923443b25e117313 [file] [log] [blame]
; unsigned char kbhit (void);
; Return true if there's a key waiting, return false if not
; TESTED
.globl _kbhit
.area _CODE
_kbhit::
call 0xBB09 ; KM READ KEY
ld (key),a
ld a,#1
ret c
ld a,#0
ret
; char cgetc (void);
; Return a character from the keyboard. If there is no character available,
; the functions waits until the user does press a key. If cursor is set to
; 1 (see below), a blinking cursor is displayed while waiting.
; TESTED
.globl _cgetc
_cgetc::
ld a,(key)
ret
;; call 0xBB09
;; jr nc,_cgetc
;; ld l,a
;; ret
.area _BSS
key: .db 0