Built-in Instructions
Here is the list of all built-in instructions.
Name | Arguments | Function |
---|---|---|
ZERO | addr | sets the value ofaddr to 0 |
INCR | addr, value | increments the value of theaddr cell by value |
DECR | addr, value | decrements the value of theaddr cell by value |
ADDP | addr1, addr2 | addsaddr2 to addr1 , the result is stored in addr1 (in place) |
SUBP | addr1, addr2 | subtractaddr2 from addr1 , the result is stored in addr1 (in place) |
COPY | addr1, addr2, addr3 | copies the value ofaddr1 into addr2 and addr3 |
WHNE | addr, value, [scope] | while the value ofaddr cell is not equal to value runs the [scope] . addr is not consumed |
IN | addr | takes input from the user and sets it inaddr , behaviour will vary between bf implementations |
OUT | addr | outputs the value ofaddr , addr is not consumed |
LSTR | start_addr, "str" | loads the string character by character into cells from thestart_addr advancing forward |
PSTR | addr, "str" | prints the string character by character using the celladdr as a buffer |
ALIS | ident, 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 |
BBOX | addr | moves the tape pointer toaddr |
ASUM | addr | tells to compiler to assume that the tape pointer is ataddr . If that assumption is wrong all cells accesses will be offset |