Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change diagrams and table for new instructions #6

Open
adam-mcdaniel opened this issue Aug 28, 2022 · 0 comments
Open

Change diagrams and table for new instructions #6

adam-mcdaniel opened this issue Aug 28, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@adam-mcdaniel
Copy link
Owner

I changed the Inc and Dec operators to two new operators:

  1. Index
  2. Swap

Index looks at the tape, reads the value, and uses that as an index for a pointer stored in the register. The address of the cell at that index is stored in the register. For implementations that use tape indexes as pointers, like the interpreter, this operation is simply addition. For implementations where pointers do not increment by 1 (an implementation with real pointers), this is addition with a constant multiplier.

Swap simply swaps the value at the tape with the value in the register.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant