Save a few t-states in loop and clean up numeric literals

This commit is contained in:
Neil McPhail 2024-10-22 11:56:45 +00:00
parent 30105450d6
commit 8310e65e6b

View File

@ -1,7 +1,7 @@
org 51000
counter EQU inc_counter + 1
attrs EQU &5800
attrs EQU #5800
xylo EQU attrs + 40
zero_counter:
@ -11,8 +11,8 @@ set_counter:
ld (counter), a
read_keyboard:
ld a, &f7
in a, (&fe)
ld a, #f7
in a, (#fe)
rra
jr nc, key_1
rra
@ -25,23 +25,23 @@ read_keyboard:
jr c, read_keyboard
key_5:
ld de, 0x040C
ld de, #040C
jr invoke
key_2:
ld de, 0x0103
ld de, #0103
jr invoke
key_3:
ld de, 0x0206
ld de, #0206
jr invoke
key_4:
ld de, 0x0309
ld de, #0309
jr invoke
key_1:
ld de, 0x0000
ld de, #0000
invoke:
push de
call highlight_key
@ -64,10 +64,10 @@ highlight_key:
ld d, 0
add hl, de
ld e, 30
ld b, 15
highlight_block:
ld a, (hl)
xor %01000000
ld b, 15
highlight_block:
ld (hl), a
inc hl
ld (hl), a