make divition return to A, because compiler.

This commit is contained in:
hugova 2025-08-01 00:32:53 +02:00
parent be13c298c7
commit 2a3db7876f
3 changed files with 4 additions and 5 deletions

View file

@ -39,5 +39,6 @@ R_neg: ; R < 0
LSR count
BNE for_i
for_i_end:
TXA
RTS
.endproc

View file

@ -15,16 +15,14 @@
LDY #(j+1)
STY VAL_B
JSR div ; A = VAL_A / VAL_B, clobers X.
CPX #i/(j+1)
CMP #i/(j+1)
BEQ :+
jmp error
:
.endrepeat
.endrepeat
TXA
jmp end
error:
TXA
;; Error make screen read
;; X * Y has the result in A that is wrong.
LDX #$02

View file

@ -12,7 +12,7 @@
JSR div ; A = VAL_A / VAL_B, clobers X.
.endrepeat
paint:
;; Donw make screen green
LDA #$13
;; Done, make screen green
LDA #$05
STA $D020
.endscope