rewrote circle code (still not working)
This commit is contained in:
parent
07e12696e5
commit
50a17ad691
2 changed files with 9 additions and 8 deletions
|
@ -1,8 +1,7 @@
|
||||||
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||||
.include "../pixel/pixel.inc"
|
.include "../pixel/pixel.inc"
|
||||||
;; public args
|
;; public args
|
||||||
radius = ARGVEC + 3
|
radius = ARGVEC + 2
|
||||||
;; private args
|
;; private args
|
||||||
t1 = $E0
|
t1 = $E0
|
||||||
t2 = $E1
|
t2 = $E1
|
||||||
temp = $E2
|
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
|
|
||||||
;; t1 = radius >> 4
|
;; t1 = radius >> 4
|
||||||
LDA radius
|
LDA radius
|
||||||
LSR
|
LSR A
|
||||||
LSR
|
LSR A
|
||||||
LSR
|
LSR A
|
||||||
LSR
|
LSR A
|
||||||
STA t1
|
STA t1
|
||||||
while_x_bigger_then_y:
|
while_x_bigger_then_y:
|
||||||
|
|
||||||
|
@ -40,11 +40,13 @@ while_x_bigger_then_y:
|
||||||
BMI endif
|
BMI endif
|
||||||
if:
|
if:
|
||||||
DEC X_pos ; x--
|
DEC X_pos ; x--
|
||||||
|
LDA t2
|
||||||
STA t1 ; t1 = t2
|
STA t1 ; t1 = t2
|
||||||
endif:
|
endif:
|
||||||
;; repeat if X > Y
|
;; repeat if X > Y
|
||||||
LDA X_pos
|
LDA X_pos
|
||||||
CMP Y_pos
|
CMP Y_pos
|
||||||
JMP while_x_bigger_then_y
|
|
||||||
;BNE while_x_bigger_then_y
|
BNE while_x_bigger_then_y
|
||||||
|
RTS
|
||||||
.endproc
|
.endproc
|
||||||
|
|
Loading…
Add table
Reference in a new issue