I do not understand how to do so before reaching the setpoint was a countdown and then also check out and start the cycle all over again with the increase.
Why when I prescribe in the code after the event is:
the counter does not go on the decrease but simply stops?
Please help write a simple code that became clear to me what I'm doing wrong.
Code:
move_right .dsb 1
Rotate:
MoveRight:
lda move_right
clc
adc #$01
sta move_right
cmp #$50
bcc RotateDone
MoveLeft:
lda move_right
sec
sbc #$01
sta move_right
bcs RotateDone
RotateDone:
Rotate:
MoveRight:
lda move_right
clc
adc #$01
sta move_right
cmp #$50
bcc RotateDone
MoveLeft:
lda move_right
sec
sbc #$01
sta move_right
bcs RotateDone
RotateDone:
Why when I prescribe in the code after the event is:
Code:
sec
sbc #$01
sbc #$01
the counter does not go on the decrease but simply stops?
Please help write a simple code that became clear to me what I'm doing wrong.