Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong code flow #3

Open
convitesamigo opened this issue Mar 13, 2024 · 0 comments
Open

Wrong code flow #3

convitesamigo opened this issue Mar 13, 2024 · 0 comments

Comments

@convitesamigo
Copy link

convitesamigo commented Mar 13, 2024

I put the following code on emulator to test it:

LD V0 0x5

SE V0 0x5 //skip if vx equal kk
JP L1
JP L2

L1:
.... LD V1 0x1
.... JP L1`

L2:
.... LD V1 0x2
.... JP L2

In this code, only the loop code starting at the "L2" label would be executed, but that is not what is happening, SE is not skipping the next instruction, causing L1 to always be executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant