Skip to content

Wrong code flow #3

@convitesamigo

Description

@convitesamigo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions