Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Instructions:
- ^ -> moves IP up
- > -> moves IP right
- v -> moves IP down
- < -> moves IP left
- + -> pops two values and pushes their sum
- - -> pops two values and pushes their difference
- ] -> pops a value; if it is 0, next instruction in IP direction is skipped, direction becomes right
- [ -> pops a value; if it is 0, next instruction in IP direction is skipped, direction becomes left
- @ -> pops a value and discards it
- $ -> swaps top two values on stack
- ! -> duplicates top value on stack
- . -> pops a value and prints it as an integer
- ' -> pops a value and prints it as a character
- , -> reads a character from stdin and pushes it
- 0-9 -> pushes an integer between 0 and 9
- & -> start of program; direction = right
- % -> end of program
- Examples:
- Infinite Loop:
- >v
- ^<
- Cat:
- &>,'v
- ^ <
- Loop:
- &01+!'v
- ^ <
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement