Built-in Instructions

Here is the list of all built-in instructions.

NameArgumentsFunction
ZEROaddrsets the value ofaddr to 0
INCRaddr, valueincrements the value of theaddr cell by value
DECRaddr, valuedecrements the value of theaddr cell by value
ADDPaddr1, addr2addsaddr2 to addr1, the result is stored in addr1 (in place)
SUBPaddr1, addr2subtractaddr2 from addr1, the result is stored in addr1 (in place)
COPYaddr1, addr2, addr3copies the value ofaddr1 into addr2 and addr3
WHNEaddr, value, [scope]while the value ofaddr cell is not equal to value runs the [scope]. addr is not consumed
INaddrtakes input from the user and sets it inaddr, behaviour will vary between bf implementations
OUTaddroutputs the value ofaddr, addr is not consumed
LSTRstart_addr, "str"loads the string character by character into cells from thestart_addr advancing forward
PSTRaddr, "str"prints the string character by character using the celladdr as a buffer
ALISident, value or [scope]creates an alias to a value or scope namedident. This instruction is purely abstraction
INLN[scope]inlines a scope
RAW"str"includes the string after transpilation, this can be used to include brainfuck operators
BBOXaddrmoves the tape pointer toaddr
ASUMaddrtells to compiler to assume that the tape pointer is ataddr. If that assumption is wrong all cells accesses will be offset