Skip to content

Added option for execution speed and comments#1

Open
dgc08 wants to merge 7 commits intoFelixSelter:mainfrom
dgc08:main
Open

Added option for execution speed and comments#1
dgc08 wants to merge 7 commits intoFelixSelter:mainfrom
dgc08:main

Conversation

@dgc08
Copy link

@dgc08 dgc08 commented Jun 5, 2024

New features:

  • Added option for the execution speed: Pressing the increase button will double the amount of instructions per second, the decrease button will half it
  • Added Assembly-like comments with ;, cleanCode() moves any comment at the end of the line into a new one though (sorry that is my first time with regex)

Major changes:

  • I changed the indexing for the registers and instructions from starting at 1 to starting at 0. I know you did that on purpose, but even my teacher said it should be starting at 0, there is no reason for it to start it at 1. If you are unhappy with this, you can always change it back tho

Minor changes / Bugfixes:

  • Deleting a register will also pop() it from the registers array. This is helpful if you for example want to clear an output register quickly
  • Previously, tst treated registers which don't exist like "full" registers, which is stupid as new registers are initialized with 0. Nonexistent registers are now treated like empty ones.
  • Fixed bug that if there were too many registers, you could only see/scroll to the last ones
  • Cleaned up some typos and refactored some parts of the code to be more readable

@dgc08 dgc08 force-pushed the main branch 3 times, most recently from 8fc2e3a to b8b2f75 Compare June 10, 2024 12:39
+ Minor code style improvements
@dgc08 dgc08 force-pushed the main branch 2 times, most recently from 826aceb to 086325a Compare June 15, 2024 11:03
+ Minor code style improvements
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

Successfully merging this pull request may close these issues.

1 participant