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 -*-
|
||||
.include "../pixel/pixel.inc"
|
||||
;; public args
|
||||
radius = ARGVEC + 3
|
||||
radius = ARGVEC + 2
|
||||
;; private args
|
||||
t1 = $E0
|
||||
t2 = $E1
|
||||
temp = $E2
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
;; t1 = radius >> 4
|
||||
LDA radius
|
||||
LSR
|
||||
LSR
|
||||
LSR
|
||||
LSR
|
||||
LSR A
|
||||
LSR A
|
||||
LSR A
|
||||
LSR A
|
||||
STA t1
|
||||
while_x_bigger_then_y:
|
||||
|
||||
|
@ -40,11 +40,13 @@ while_x_bigger_then_y:
|
|||
BMI endif
|
||||
if:
|
||||
DEC X_pos ; x--
|
||||
LDA t2
|
||||
STA t1 ; t1 = t2
|
||||
endif:
|
||||
;; repeat if X > Y
|
||||
LDA X_pos
|
||||
CMP Y_pos
|
||||
JMP while_x_bigger_then_y
|
||||
;BNE while_x_bigger_then_y
|
||||
|
||||
BNE while_x_bigger_then_y
|
||||
RTS
|
||||
.endproc
|
||||
|
|
Loading…
Add table
Reference in a new issue