LOGIFUNGE
W H
READY
SOURCE
STACK empty
OUTPUT

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 ,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]define subroutine (body ends with r) ;[name]call subroutine rreturn from subroutine {[name]loop top marker }[name]loop bottom: pop; jump if nonzero

Examples — click to load

Press ? or / to toggle · Esc to close · Ctrl+Enter to run