by jcmeyrignac · 8y ago · 0 comments
1) in get_block, we can replace "dec count" with "cpy count" It should save one or 2 cycles, if I'm not mistaken
2) get_countdown can be rewritten as follows:
ldy #$89
c4:
cpy #$89
bne c1
c0:
jsr get_byte
c1:
ldy #$89
bne c2
cx:
jsr get_byte
c2:
sty tmp_cntdwn
cmp tmp_cntdwn
bne c4
dey
cpy #$80
bne cx
rts
which saves probably 4 bytesIt would, but wouldn't it also set the carry flag? Thus the routine would always return with carry flag set.