blob: 8ca55adcc0cfdec4f4deac545ef391c932889531 [file] [log] [blame]
kthacker62e146c2006-04-17 15:11:35 +00001; unsigned char kbhit (void);
2; Return true if there's a key waiting, return false if not
3; TESTED
4
5.globl _kbhit
6 .area _CODE
7_kbhit::
8 call 0xBB09 ; KM READ KEY
9 ld (key),a
10 ld l,#1
11 ret c
12 ld l,#0
13 ret
14
15; char cgetc (void);
16; Return a character from the keyboard. If there is no character available,
17; the functions waits until the user does press a key. If cursor is set to
18; 1 (see below), a blinking cursor is displayed while waiting.
19; TESTED
20
21.globl _cgetc
22
23_cgetc::
24 ld a,(key)
25 ld l,a
26 ret
27
28;; call 0xBB09
29;; jr nc,_cgetc
30;; ld l,a
31;; ret
32
33key: .db 0