Implemented a one-character buffer for kbhit() and cgetc().

If kbhit() detects that a key is pressed, it fetches and
buffers the character. If cgetc() detects a buffered character,
this one is returned instead of fetching one with the PROM
routine.
This commit is contained in:
Stephan Mühlstrasser
2015-02-21 20:24:58 +01:00
parent b1969ac16a
commit 222668c016
5 changed files with 27 additions and 6 deletions

View File

@@ -14,6 +14,7 @@
CURS_X: .res 1
CURS_Y: .res 1
SCREEN_PTR: .res 2
CHARBUF: .res 1
; size 4
; Adjust size of this segment in osic1p.cfg if the size changes
; size 5
; Adjust size of the ZP segment in osic1p.cfg if the size changes