]> git.sur5r.net Git - cc65/blob - libsrc/cbm510/kbhit.s
Squeezed bytes and cycles out of the kbhit functions for almost all platforms.
[cc65] / libsrc / cbm510 / kbhit.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; unsigned char kbhit (void);
5 ;
6
7         .export         _kbhit
8         .import         keyidx: zp
9
10
11 .proc   _kbhit
12
13         ldx     #0              ; High byte of return is always zero
14         lda     keyidx          ; Get number of characters
15         beq     L9
16         lda     #1
17 L9:     rts
18
19 .endproc
20
21
22
23
24