cc65's C64 runtime and ip65 call past the jump table: $E5B4 takes the first key from the keyboard buffer (cgetc), $EA24 points USER at the colour RAM of PNT's line (cursor positioning), and $ECF0 holds the low bytes of the screen lines' addresses (ip65's VT100 code), as Mapping the Commodore 64 describes them. vicii_init's work moves out of $E5A0-$E5C8 to free $E5B4, and on the standard layout PNT and USER are worked out through the routine at $EA24.
22 lines
384 B
ArmAsm
22 lines
384 B
ArmAsm
;; #LAYOUT# STD * #TAKE
|
|
;; #LAYOUT# * * #IGNORE
|
|
|
|
;
|
|
; Well-known Kernal routine, described in:
|
|
;
|
|
; - [CM64] Computes Mapping the Commodore 64 - $E5B4, LP2
|
|
;
|
|
; Takes the first key from the keyboard buffer, which must not be empty, and moves the
|
|
; others up. Out: the key in A. X is kept.
|
|
;
|
|
|
|
|
|
get_from_keyboard_buffer:
|
|
|
|
lda KEYD
|
|
pha
|
|
jsr pop_keyboard_buffer
|
|
pla
|
|
|
|
rts
|