Lolwho.Cares is a eighteen-trit, stack-based esoteric language with instructions on a 2D grid.
Code in Lolwho.Cares may read and write it's own instructions (or data included in the program) at will.
The biggest possible number (due to VM constraints) is 222222222222222222 (base 3), 387420488 (base 10)
Operations:
010
Swap top two values
012
Increment
020
Decrement
021
Duplicate
120
Discard
121
Add top two values
101
Sub top two values
102
Pop X, Y, value, then store
210
Pop X, Y, then load, push value
212
Input value
201
Output value
An operation may be shortened with the following rules:
The last character of the instruction is duplicated if another instruction follows without non-trit characters preceding, this becomes the "base" for the next instruction.
The remaining characters are "rounded up" when the last explicit character is on an even square.
It is not required to add another instruction immediately following the shortened instruction, and if omitted, the duplicate character should also be omitted.
The "base character" is "0", unless an instruction was just shortened.
The meaning of "base character":
Base character
Desired -> In code
0 (default)
0 -> 0, 1 -> 1, 2 -> 2
1
0 -> 1, 1 -> 2, 2 -> 0
2
0 -> 2, 1 -> 0, 2 -> 1
Rounding "up" or "down" means that the "highest" or "lowest" trit which does not match the previous character is picked.
Flow control:
^
Go up
v
Go down
<
Go left
>
Go right
`
Turn left if equal
,
Turn right if equal
Note: Equal in this context means that the top entry on the stack is zero.
Data is inserted by trinary numbers between * and + (not required).
Data with a zero length is equal to zero.