Compare commits
No commits in common. "0afed893a672d5f54122a4f8dcf2f10eb50cdb90" and "57975b7158c8dae6ee2d10519a4bca36f3b6dac1" have entirely different histories.
0afed893a6
...
57975b7158
1 changed files with 4 additions and 10 deletions
14
mandel.s
14
mandel.s
|
@ -397,7 +397,7 @@ neg2:
|
||||||
|
|
||||||
positive:
|
positive:
|
||||||
inc arg + 2 ; 5 cyc
|
inc arg + 2 ; 5 cyc
|
||||||
bne next ; 2 cyc
|
beq next ; 2 cyc
|
||||||
inc arg + 3 ; 5 cyc
|
inc arg + 3 ; 5 cyc
|
||||||
|
|
||||||
zero:
|
zero:
|
||||||
|
@ -436,16 +436,11 @@ keep_going:
|
||||||
|
|
||||||
.macro quick_exit arg
|
.macro quick_exit arg
|
||||||
.local keep_going
|
.local keep_going
|
||||||
.local keep_going2
|
|
||||||
lda arg + 1
|
lda arg + 1
|
||||||
cmp #(4 << 4)
|
cmp #(4 << 4)
|
||||||
bmi keep_going
|
bmi keep_going
|
||||||
rts
|
rts
|
||||||
keep_going:
|
keep_going:
|
||||||
cmp #(256 - (4 << 4))
|
|
||||||
bpl keep_going2
|
|
||||||
rts
|
|
||||||
keep_going2:
|
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
; 4.12: (-8 .. +7.9)
|
; 4.12: (-8 .. +7.9)
|
||||||
|
@ -457,19 +452,18 @@ keep_going:
|
||||||
; zy = zx_zy + zx_zy + cy
|
; zy = zx_zy + zx_zy + cy
|
||||||
add16 zy, zx_zy, zx_zy
|
add16 zy, zx_zy, zx_zy
|
||||||
add16 zy, zy, cy
|
add16 zy, zy, cy
|
||||||
quick_exit zy
|
|
||||||
|
|
||||||
; zx_2 = zx * zx
|
; zx_2 = zx * zx
|
||||||
imul16_round zx_2, zx, zx, 4
|
imul16_round zx_2, zx, zx, 4
|
||||||
quick_exit zx_2
|
quick_exit dist
|
||||||
|
|
||||||
; zy_2 = zy * zy
|
; zy_2 = zy * zy
|
||||||
imul16_round zy_2, zy, zy, 4
|
imul16_round zy_2, zy, zy, 4
|
||||||
quick_exit zy_2
|
quick_exit dist
|
||||||
|
|
||||||
; zx_zy = zx * zy
|
; zx_zy = zx * zy
|
||||||
imul16_round zx_zy, zx, zy, 4
|
imul16_round zx_zy, zx, zy, 4
|
||||||
quick_exit zx_zy
|
quick_exit dist
|
||||||
|
|
||||||
; dist = zx_2 + zy_2
|
; dist = zx_2 + zy_2
|
||||||
add16 dist, zx_2, zy_2
|
add16 dist, zx_2, zy_2
|
||||||
|
|
Loading…
Reference in a new issue