diff --git a/wip-hugo/routines/circle/circle.inc b/wip-hugo/routines/circle/circle.inc index 81ba847..598af41 100644 --- a/wip-hugo/routines/circle/circle.inc +++ b/wip-hugo/routines/circle/circle.inc @@ -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 diff --git a/wip-hugo/routines/circle/circle.s b/wip-hugo/routines/circle/circle.s index 4b9e40f..b272ee3 100644 --- a/wip-hugo/routines/circle/circle.s +++ b/wip-hugo/routines/circle/circle.s @@ -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