LOGIFUNGE REFERENCE
✕ ESC
Direction
>move right
<move left
^move up
vmove down
?random direction
#trampoline (skip next)
Logic Gates
&AND(a, b)
|OR(a, b)
~NOT(a)
@XOR(a, b)
NNAND(a, b)
RNOR(a, b)
XXNOR(a, b)
Stack
0-9push digit
[n]push number n (e.g. [42])
:duplicate top
\swap top two
$pop and discard
+−*/arithmetic
Output
.print top as number
=print top as ASCII character (65 → A)
,push pixel: pop x,y,val(0/1) → write
'pull pixel: pop x,y → push value
"string mode (push ASCII)
%END program
Control Flow
_horizontal if (0→right, else left)
!vertical if (0→down, else up)
gget cell(x, y)
pput cell(v, x, y)
{[name]loop top marker
}[name]loop bottom: pop; jump if nonzero
Subroutines
D[name]define a subroutine (body ends with r)
C[name]call a subroutine
rreturn from the current routine
Memory
(pack the last n stack values into one self-describing value
)unpack a packed value back into its original n values (no count needed)
Wswap the values at two stack indexes
M/S/Lset, store, and load via a memory pointer
Press ? or / to toggle · Esc to close · Ctrl+Enter to run