From 156abddbe78a1da426cbd539cdc7179a50cd6784 Mon Sep 17 00:00:00 2001 From: hugova Date: Thu, 10 Jul 2025 16:40:14 +0200 Subject: [PATCH] reduse SEC instruction from circle-draw --- wip-hugo/routines/circle/circle.s | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wip-hugo/routines/circle/circle.s b/wip-hugo/routines/circle/circle.s index 50573ad..e8cf1f2 100644 --- a/wip-hugo/routines/circle/circle.s +++ b/wip-hugo/routines/circle/circle.s @@ -134,7 +134,9 @@ draw_right_px_in_circle:; similar as above LDX #$08 ; X=8 always expected inside the loop -while_x_bigger_then_y: + + SEC +while_x_bigger_then_y: ; C=1 here because above and branching logic draw_pixels: draw_qaa: LDY Y_qaa @@ -187,7 +189,8 @@ qaa_y: qaa_y_underflow: ;; Switch to chunk bellow ; So we subtract #$0140 - Sub_16 btp_mem_pos, btp_mem_pos + 1, #$40, #$01 ;-320 + ;; Note that C =1, read from while_x_bigger_then_y label. + Sub_16 btp_mem_pos, btp_mem_pos + 1, #$40, #$01, ! ;-320 Sub_16 btp_mem_pos_qba, btp_mem_pos_qba + 1, #$40, #$01,! STY Y_qaa ; Y_qaa =$07 qaa_y_end: