1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

saves 2 bytes in the standard c64 joystick driver

remove redundant code and add jmp to the common sequence
two more bytes could be saved at the expense of longer sequence with interrupts disabled by moving sei/cli
This commit is contained in:
Gabriele Gorla 2021-09-08 15:00:20 -07:00 committed by Oliver Schmidt
parent f796c26091
commit 6637e28831

View File

@ -93,9 +93,7 @@ joy1: lda #$7F
sta CIA1_PRA
lda CIA1_PRB
cli
and #$1F
eor #$1F
rts
jmp end
; Read joystick 2
@ -107,8 +105,6 @@ joy2: ldx #0
lda CIA1_PRA
sty CIA1_DDRA
cli
and #$1F
end: and #$1F
eor #$1F
rts