implement GETIN function
This commit is contained in:
1 parent
635cefe312
commit
03550ab786
1 file changed
+19
@@ -1,3 +1,22 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
getin:
|
||||
|
||||
;; Wait for a key
|
||||
lda keys_in_key_buffer
|
||||
bne +
|
||||
|
||||
;; Nothing in keyboard buffer to read
|
||||
lda #$00
|
||||
sec
|
||||
rts
|
||||
|
||||
*
|
||||
lda keyboard_buffer
|
||||
pha
|
||||
|
||||
jsr pop_keyboard_buffer
|
||||
|
||||
pla
|
||||
clc
|
||||
|
||||
rts
|
||||
Reference in new issue
Block a user