diff options
Diffstat (limited to 'timed_getch.s')
-rw-r--r-- | timed_getch.s | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/timed_getch.s b/timed_getch.s index 9a0f9a1..41b9ecb 100644 --- a/timed_getch.s +++ b/timed_getch.s @@ -1,7 +1,7 @@ .export _timed_getch, _set_jiffy_timer, _agetc, _numgetc .export _yngetc, _lcgetc, _jsleep - .import _cgetc, _cblank, _cursor + .import _cgetc, _cblank, _cursor, _rand .include "atari.inc" @@ -69,6 +69,15 @@ _agetc: jsr _cgetc ; get ATASCII code of keypress + ; twitch the random bottle based on the low bit of + ; the character entered. + pha + and #$01 + beq @nr + jsr _rand +@nr: + pla + ; special cases cmp #$9b ; enter key, return as-is beq ok |