make divition return to A, because compiler.
This commit is contained in:
parent
be13c298c7
commit
2a3db7876f
3 changed files with 4 additions and 5 deletions
|
@ -39,5 +39,6 @@ R_neg: ; R < 0
|
|||
LSR count
|
||||
BNE for_i
|
||||
for_i_end:
|
||||
TXA
|
||||
RTS
|
||||
.endproc
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue