Super SNUSP
Jump to navigation
Jump to search
Super SNUSP is a language inspired by the brainfudge derivative SNUSP. It has additional commands from other bf derivatives, like:
- Decimal I/O
- Arithmetic and bitwise operators
- A stack
- And more!
Commands
Charcode | Ascii | Opcode | Meaning |
---|---|---|---|
032 | Space | NOP | Do nothing |
033 | ! | SKIP | Skip next instruction |
034 | " | START | This is where the IP starts. Starts at bottom right if not found. |
035 | # | OUT | Print cell value as decimal |
036 | $ | DROP | Pop the stack and discard |
037 | % | MOD | Modulo cell by stack top (has sign of cell) |
038 | & | AND | Bitwise and cell by stack top |
039 | ' | END | This is where the IP ends |
040 | ( | DEC | Subtract 1 from cell |
041 | ) | INC | Add 1 to cell |
042 | * | MULT | Multiply cell by stack top |
043 | + | ADD | Add stack top to cell |
044 | , | KEY | Get char input into cell |
045 | - | SUB | Subtract stack top from cell |
046 | . | EMIT | Print cell as byte character |
047 | / | RULD | Same as in SNUSP |
048 - 057 | 0-9 | SET | If last command was digit, multiply by 10, else zero out and add literal value |
058 | : | DIV | Divide cell by stack top, rounded towards negative infinite |
059 | ; | ROOT | Set cell to stack top root of cell (rounded towards negative infinity, even root of negative is error) |
060 | < | BAK | Move pointer backwards by 1 |
061 | = | RAND | Set cell to a random number between cell and stack pop |
062 | > | FWD | Move pointer forwards by 1 |
063 | ? | SKIPZ | If cell == 0, perform a SKIP. |
064 | @ | IN | Input decimal number into current cell |
064 - 090 | A-Z | - | Set cell to ASCII value of letter |
091 | [ | LSH | Left shift cell by top of stack bits |
092 | \ | LURD | Same as in SNUSP |
093 | ] | RSH | Right shift |
094 | ^ | XOR | Bitwise xor cell by stack top |
095 | _ | NEG | Multiply cell by -1 |
096 | ` | SKIPN | If cell is negative, perform a SKIP. |
097 - 122 | a-z | - | Set cell to ASCII value of letter |
123 | { | STO | Push cell to stack |
124 | | | OR | Bitwise or cell by stack top |
125 | } | RCL | Set cell to stack top |
126 | ~ | NOT | Bitwise not current cell |
Examples
Hello, World!:
"33>d>l>r>o>W>32>44>o>l>l>e>H!/ ?\' \<./
Cat:
,!/ ?\' \,./
Computational class
Turing complete, because it has all of SNUSP's commands, except that + and - are replaced by ( and ).