GitJer / Some_RPI-Pico_stuff

Some experiments I did with the Raspberry Pi Pico

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

emulator jmp decrement

odewdney opened this issue · comments

From the documentation, X/Y is always decremented on the conditional jump (verified with loop on actual hardware). I updated my code to:

        elif jmp_condition == 2:    # x--
            if self.vars["x"] != 0:
                do_jump = True
            self.vars["x"] = (self.vars["x"] - 1) & 0xffffffff

same for y

Yep, it says "X--: scratch X non-zero, post-decrement". I corrected it. Good catch, Thanks!