Skip to content
This repository was archived by the owner on Jul 9, 2022. It is now read-only.

Commands

LyricLy edited this page Jul 18, 2017 · 28 revisions

I/O

i - Take in a byte of input as its ASCII value and push it to the stack.

n - Take in a space-separated portion of input as a raw number and push it to the stack.

o - Pop one number from the stack, turn it into the character with that ASCII value, and print it.

u - Pop one number from the stack, and print it.

Stack manipulation

r - Reverse the stack.

: - Duplicate the top value on the stack.

f - Flip the position of the two highest values on the stack.

! - Pop a number from the stack. If it is 0, push 1. Otherwise, push 0.

" - String literals; push the ASCII value of every character after the quote until another quote is met.

Operators

+, -, *, /, % - Pop X and Y off the stack, then push Y operator X.

Loops

[ - If the top of the stack is 0, skip the execution pointer to the corresponding ]. Otherwise, do nothing.

] - If the top of the stack is not 0, move the execution pointer back to the corresponding [. Otherwise, do nothing.

Backup cell

s - Save the top of the stack to the backup cell. This does not pop from the stack.

l - Take the current value of the backup cell, and push it to the stack. The backup cell will not lose its value.

Misc

; - End execution. This instruction is only required to end execution early; it is not required to add it at the end of every program.

Clone this wiki locally