mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-08-12 12:29:04 +00:00
entropy: another two bytes off thanks to qkumba
This commit is contained in:
parent
c11bc7f5f6
commit
d10d9cda5a
Binary file not shown.
@ -24,6 +24,8 @@
|
|||||||
; 135 bytes: store X to HGR_SCALE rather than TXA+STA
|
; 135 bytes: store X to HGR_SCALE rather than TXA+STA
|
||||||
; 131 bytes: some fancy branch elimination by noticing X=1
|
; 131 bytes: some fancy branch elimination by noticing X=1
|
||||||
; 126 bytes: nextx: simplify by using knowledge of possible x/y vals
|
; 126 bytes: nextx: simplify by using knowledge of possible x/y vals
|
||||||
|
; 124 bytes: qkumba noticed we can bump yloop up to include the
|
||||||
|
; pha, letting us remove two now unneeded stack ops
|
||||||
|
|
||||||
;BLT=BCC, BGE=BCS
|
;BLT=BCC, BGE=BCS
|
||||||
|
|
||||||
@ -70,9 +72,8 @@ entropy:
|
|||||||
|
|
||||||
eloop:
|
eloop:
|
||||||
lda #4 ; FOR Y=4 to 189 STEP 6
|
lda #4 ; FOR Y=4 to 189 STEP 6
|
||||||
pha ; YPOS stored on stack
|
|
||||||
|
|
||||||
yloop:
|
yloop:
|
||||||
|
pha ; YPOS stored on stack
|
||||||
lda #4 ; FOR X=4 to 278 STEP 6
|
lda #4 ; FOR X=4 to 278 STEP 6
|
||||||
sta XPOS
|
sta XPOS
|
||||||
lda #0 ; can't fit 278 in one byte, need overflow byte
|
lda #0 ; can't fit 278 in one byte, need overflow byte
|
||||||
@ -185,12 +186,10 @@ nexty: ; NEXT Y
|
|||||||
pla ; YPOS on stack
|
pla ; YPOS on stack
|
||||||
adc #5 ; y+=6
|
adc #5 ; y+=6
|
||||||
; carry always set coming in, so only add 5
|
; carry always set coming in, so only add 5
|
||||||
pha ; YPOS back on stack
|
|
||||||
cmp #189 ; see if less than 189
|
cmp #189 ; see if less than 189
|
||||||
bcc yloop ; if so, loop
|
bcc yloop ; if so, loop
|
||||||
|
|
||||||
nexte: ; NEXT E
|
nexte: ; NEXT E
|
||||||
pla
|
|
||||||
inc EPOS
|
inc EPOS
|
||||||
lda EPOS
|
lda EPOS
|
||||||
cmp #15
|
cmp #15
|
||||||
|
Loading…
Reference in New Issue
Block a user