Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39.

This commit is contained in:
Greg King
2022-04-02 09:39:35 -04:00
parent 75ee10478e
commit a5e69e7ea6
18 changed files with 208 additions and 172 deletions

View File

@@ -1,5 +1,5 @@
;
; 2020-01-08, Greg King
; 2022-03-28, Greg King
;
; unsigned char kbhit (void);
; /* Returns non-zero (true) if a typed character is waiting. */
@@ -7,14 +7,11 @@
.export _kbhit
.include "cx16.inc"
.import KBDBUF_PEEK
.proc _kbhit
ldy VIA1::PRA ; (KEY_COUNT is in RAM bank 0)
stz VIA1::PRA
lda KEY_COUNT ; Get number of characters
sty VIA1::PRA
tax ; High byte of return (only its zero/nonzero ...
jsr KBDBUF_PEEK
txa ; Low byte of return (only its zero/nonzero ...
rts ; ... state matters)
.endproc