Opcodes - HecknTarnation/YATDEL GitHub Wiki

code = case sensitive
S - Start
E - End
Q - Ends all pointers, regardless of any pointer's current state
T - new Thread/Pointer (runs the code in the next space, its direction will be set to dir rule)
t - new Thread/Pointer (runs the code in the next space, its direction will be set to dir rule 2)
= - moves pointer horizontally
| - moves pointer vertically
< - changes the pointer's current direction to left
> - changes the pointer's current direction to right
v - changes the pointer's current direction to down
^ - changes the pointer's current direction to up
( - stores the next set of characters into the thread's stack as a number representing a character, this will occur until a matching ) is found. The characters will be in reverse order on the stack (first character in = last character on the stack).
# - stores the next set of characters into the thread's stack as a number, this will occur until a matching # is found
Note that both the ( and # should have the pointer going in the right (relative to the string or number) direction, so don't have the pointer flow down on top of the ending one for example. This will cause an error (ArrayIndexOutOfBounds). You may fix this in your own interpreter if you wish (the default one won't fix this).
p - pops the top value from the thread's stack (and gets rid of it)
+ - adds the top value from the thread's stack to the next one in the stack (and pushes it onto the stack)
- - subtracts the top value from the thread's stack to the next one in the stack (and pushes it onto the stack)
* - multiply the top value from the thread's stack to the next one in the stack (and pushes it onto the stack)
d - divide the top value from the thread's stack to the next one in the stack (and pushes it onto the stack)
% - modulus the top value from the thread's stack to the next one in the stack (and pushes it onto the stack)
I - gets input from the console and pushes it to the pointer's stack
O - prints the top value from the thread's stack to the console (as a character)
o - prints the top value from the thread's stack to the console (as a number)
' - Goes one Abstract down in the list
" - Goes a number of Abstracts down in the Abstract list, the number being the topmost value in the pointer's stack
~ - Makes the pointer's top stack value negative
C - If the pointer's top stack value is positive the pointer will go to dir rule, else dir rule 2 (doesn't pop stack)
c - If the pointer's top stack value is positive the pointer will go to dir rule 2, else dir rule (doesn't pop stack)
\ - mirror (Right <-> Down, Left <-> Up)
/ - mirror (Right <-> Up, Left <-> Down)
@ - replaces a character on the Abstract (first value on stack = x, second = y, third = character)
& - pushes a random number between 0-100 to the stack
? - moves the pointer in a random direction
$ - makes the pointer wait a specific amount of time (the first value on the stack, popped after) before moving again
! - duplicates the top value of the stack