|
|
|
|
|
by jcmeyrignac
2344 days ago
|
|
I just read your source code a bit, and there are a lot of things wrong.
First, you should ALWAYS clear the carry when using ADC or set the carry when using SBC For example:
.increase:
adc #1
sta POSITION_MENU I have no idea if you increment or add two, since the carry is not cleared. clc
lda CURRENT_RAM_ADDRESS_L
adc #$01
sta CURRENT_RAM_ADDRESS_L
lda CURRENT_RAM_ADDRESS_H
adc #$00
sta CURRENT_RAM_ADDRESS_H
this is done by the usual INC CURRENT_RAM_ADDRESS_L BNE *+2 INC CURRENT_RAM_ADDRESS_H ldy POSITION_CURSOR
cpy #0
cpy #0 is useless.lda POSITION_CURSOR
cmp #0
cmp #0 is useless jsr / rts can be replaced by jmp clear_ram is super slow |
|