8086.js icon indicating copy to clipboard operation
8086.js copied to clipboard

Feature to step back one instruction, and execute all instructions

Open roerohan opened this issue 4 years ago • 1 comments

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.

https://github.com/roerohan/8086.js/blob/017505bca69da4b7e803a2cd3e5353f9a14c5660/src/components/ButtonsContainer/index.jsx#L45-L48

roerohan avatar Sep 24 '20 05:09 roerohan

#47 Adds these features. Currently, there is a bug while running code from a stepped-back position. Steps to reproduce are mentioned in the PR.

namsnath avatar Oct 02 '20 13:10 namsnath