mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-24 23:25:28 +00:00
fire_tiny: shave a few more bytes off
This commit is contained in:
parent
70ecf26c92
commit
cc062df9c2
@ -19,10 +19,11 @@
|
|||||||
; 140 bytes -- start using zero-page addressing
|
; 140 bytes -- start using zero-page addressing
|
||||||
; 139 bytes -- rotate instead of mask for low bit
|
; 139 bytes -- rotate instead of mask for low bit
|
||||||
; 138 bytes -- bcs instead of jmp
|
; 138 bytes -- bcs instead of jmp
|
||||||
|
; 137 bytes -- BIT nop trick to get rid of jump
|
||||||
|
; 135 bytes -- push/pull instead of saving to zero page
|
||||||
|
|
||||||
; Zero Page
|
; Zero Page
|
||||||
SEEDL = $4E
|
SEEDL = $4E
|
||||||
TEMP = $00
|
|
||||||
TEMPY = $01
|
TEMPY = $01
|
||||||
|
|
||||||
; 100 = $64
|
; 100 = $64
|
||||||
@ -75,7 +76,7 @@ yloop:
|
|||||||
xloop:
|
xloop:
|
||||||
smc1:
|
smc1:
|
||||||
lda $7d0,Y ; 3
|
lda $7d0,Y ; 3
|
||||||
sta TEMP ; 2
|
pha ; save on stack ; 1
|
||||||
and #$7 ; mask off ; 2
|
and #$7 ; mask off ; 2
|
||||||
tax ; 1
|
tax ; 1
|
||||||
|
|
||||||
@ -98,14 +99,14 @@ noEor: sta SEEDL
|
|||||||
; end inlined RNG
|
; end inlined RNG
|
||||||
|
|
||||||
ror ; shift into carry ; 1
|
ror ; shift into carry ; 1
|
||||||
bcc no_change ; 2
|
|
||||||
|
|
||||||
decrement:
|
pla ; 1
|
||||||
lda <color_progression,X ; 2
|
|
||||||
bcs done_change ; 2
|
bcs no_change ; 2
|
||||||
|
|
||||||
|
.byte $2c ; BIT trick, nops out next instruction
|
||||||
no_change:
|
no_change:
|
||||||
lda TEMP ; 2
|
lda <color_progression,X ; 2
|
||||||
done_change:
|
|
||||||
|
|
||||||
smc2:
|
smc2:
|
||||||
sta $750,Y ; 3
|
sta $750,Y ; 3
|
||||||
|
Loading…
Reference in New Issue
Block a user