Skip to content

Commit

Permalink
add drop
Browse files Browse the repository at this point in the history
  • Loading branch information
vadixidav committed Apr 22, 2018
1 parent a6b1cdf commit 817aebb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion base_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ One of those things could be to push a set of registers onto the stack at the be

If we use a dedicated loop instruction, we can make it so any time we move back to the beginning of the loop that the loop puts the registers on the stack. This is especially helpful because the first iteration of the loop gets the initial inputs, just as in the above solution, but even more useful because now we can automatically return to the beginning without specifically requiring the PC, which is more useful for branching paths conditionally exiting the loop or doing other things. This does make returning take an extra instruction to `unloop` the loop, which is not otherwise necessary since no loop stack or any special loop state exists.

### Rotate
### Rotate

### Drop

Being able to drop values off of the staack is not vastly important, because if they were optional they could have been in registers which automatically get reset. However, at some point taking advantage of this instruction to leave ordered accumulators on the stack might come in handy.

- drop

0 comments on commit 817aebb

Please sign in to comment.