This repository was archived by the owner on Jul 9, 2022. It is now read-only.
Add integer division, bitwise operations, stack to stack copy, "yank", and stack rotation commands #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added some additional commands that I think might be interesting. Let me know if
any of them seem interesting asis or if you'd like to tweak how they work.
Here's the new ones included in the code in the PR. The B/b/E/e ones are to make
it possible to copy things from one stack to another without having to use the
backup cell. And the Q/q ones let you treat the stack like a wheel you can spin
in other direction.
_ : Integer division
A : bitwise "and" top two stack entries
O : bitwise "or" top two stack entries
X : bitwise "xor" top two stack entries
B : push a copy of the top of the stack onto the stack to the left
b : push a copy of the bottom of the stack onto the stack to the left
E : push a copy of the top of the stack onto the stack to the right
e : push a copy of the bottom of the stack onto the stack to the right
Y : "yank" an entry from the stack, push it on the top (like "I" but it deletes what it copies)
q : pops a number off the top of the stack, rotates the stack down that many times
Q : pops a number off the top of the stack, rotates the stack up that many times