Skip to content

Confusing instruction line highlight #30

@brunobord

Description

@brunobord

Using the interactive terminal mode, sometimes, the highlighted line does not correspond to the instruction that is ready to be executed, which may confuse the user.

Most of the time, it's right after a jmp instruction, or a BRNE, for example.

For example with this program

1: ldi r16, 10
2: loop:
3: dec r16
4: brne loop
5: done:
6: jmp done

Steps:

  • 0 - Highlight at line 1, ldi instruction
  • 1 - Highlight at line 5, dec r16
  • 2 - Highlight at line 1 (ldi r16, 10), but the first line of the CLI output says the instruction is BRNE loop, which is at line 6.
  • 3 - Highlight at line 3, dec r16 instruction.
  • ... it goes on until the Z flag is set and thus, it breaks out of the loop
  • 21 - Highlight at line 4 (brne loop), but the 1st line of the CLI output says that the instruction is JMP done.

So that's a strange behaviour. Sometimes, the highlight is on the instruction that is just about to be executed, and some other times, it's the instruction line right before this one.

Do you think it can be improved in a way or another?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions