Skip to content

Feature to step back one instruction, and execute all instructions #16

@roerohan

Description

@roerohan

Feature to step back one instruction, and execute all instructions

The bot can only execute instructions one by one currently. Features to execute all instructions at once, and step back an instruction to see the state would be useful for debugging!

Step back

  • A possible solution for this would be storing all the states in a redux slice and reinitializing registers and memory according to it's previous state.

Execute all

  • Right now, instructions are executed with the help of the stepClick function below, which is triggered by clicking the next step button on the UI.
  • For executing all instructions, a possible solution would be to call emulator.cpu.step() repeatedly until the last instruction is reached.

const stepClick = () => {
loadCode();
emulator.cpu.step();
dispatch(updateRegisters(emulator.getRegisters()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions