reduse a STA instruction in circle code
This commit is contained in:
parent
38070296d0
commit
49a330d24c
3 changed files with 85 additions and 86 deletions
|
@ -5,16 +5,15 @@
|
||||||
;; and others from pixel.inc
|
;; and others from pixel.inc
|
||||||
;; private args
|
;; private args
|
||||||
t1 = $E0
|
t1 = $E0
|
||||||
t2 = $E1
|
|
||||||
X_math = radius
|
X_math = radius
|
||||||
Y_math = $E2
|
Y_math = $E1
|
||||||
byte_to_paint_qaa = $E3
|
byte_to_paint_qaa = $E2
|
||||||
byte_to_paint_qcb = $E4
|
byte_to_paint_qcb = $E3
|
||||||
byte_to_paint_qca = $E5
|
byte_to_paint_qca = $E4
|
||||||
byte_to_paint_qdb = $E6
|
byte_to_paint_qdb = $E5
|
||||||
|
|
||||||
btp_mem_pos_qaa = btp_mem_pos
|
btp_mem_pos_qaa = btp_mem_pos
|
||||||
btp_mem_pos_qcb = $E7 ; 16bit value (uses E8)
|
btp_mem_pos_qcb = $E6 ; 16bit value (uses E7)
|
||||||
; E9 - EA is used by pixel.inc
|
; E9 - EA is used by pixel.inc
|
||||||
btp_mem_pos_qdb = $EB ; 16bit value (uses EC)
|
btp_mem_pos_qdb = $EB ; 16bit value (uses EC)
|
||||||
btp_mem_pos_qda = $ED ; 16bit value (uses EE)
|
btp_mem_pos_qda = $ED ; 16bit value (uses EE)
|
||||||
|
@ -24,9 +23,9 @@
|
||||||
btp_mem_pos_qbb = $D6 ; 16bit value (uses D7)
|
btp_mem_pos_qbb = $D6 ; 16bit value (uses D7)
|
||||||
|
|
||||||
Y_qda = $EF
|
Y_qda = $EF
|
||||||
Y_qdb = $D8
|
Y_qdb = $E8
|
||||||
Y_qbb = $D9
|
Y_qbb = $D8
|
||||||
Y_qaa = $DA
|
Y_qaa = $D9
|
||||||
;;Reuse addresses, be carful here!
|
;;Reuse addresses, be carful here!
|
||||||
temp__ = Y_qaa
|
temp__ = Y_qaa
|
||||||
temp_ = Y_qda
|
temp_ = Y_qda
|
||||||
|
|
|
@ -229,7 +229,7 @@ qcb_x_end:
|
||||||
;; t2 = t1 - x
|
;; t2 = t1 - x
|
||||||
SEC
|
SEC
|
||||||
SBC X_math
|
SBC X_math
|
||||||
STA t2
|
;t2 do not need to be saved :)
|
||||||
;; if t2 < 0 then skip to endif
|
;; if t2 < 0 then skip to endif
|
||||||
;; we can skipp CMP #$00 because SBC above do the same
|
;; we can skipp CMP #$00 because SBC above do the same
|
||||||
BPL if
|
BPL if
|
||||||
|
|
0
wip-hugo/routines/memory/memset_alt.s
Executable file → Normal file
0
wip-hugo/routines/memory/memset_alt.s
Executable file → Normal file
Loading…
Add table
Reference in a new issue