XBF

From Esolang
Jump to: navigation, search

XBF is a Brainfuck variant.

These are the commands:

  • [ ] + - < > , . is same as brainfuck
  •  ; : is for alternate I/O (error on standard CLI)
  • 0-9 A-F moves the low nybble of the value in current cell to the high nybble and then sets the low nybble to the value that you put depending on the command character
  • # does a external command numbered by the value of the current cell (error on standard CLI)
  •  ? insert a cell with value zero
  •  ! delete a cell
  • ( ) move pointer number of spaces according to W register
  • X Y Z are registers storing a pointer, set the register to current pointer
  • x y z retrieves the registers, set pointer
  • W is a register storing a byte, this command sets the register
  • w retrieves the value stored in the register
  • & value at pointer is set to value at pointer NAND value of W register

These commands work on a line by themself:

  • ' makes a label
  • '' is a comment
  • ^ goto a label
  • ^= conditional goto label if value at pointer is equal to W register
  • ^< conditional goto label if value at pointer is less than W register
  • ^> conditional goto label if value at pointer is greater than W register
  • ^! conditional goto label if value at pointer is not equal to W register
  • ^; conditional goto label if value at pointer is equal to value at Z register pointer
  • ^^ go back to line after last command executed goto label (it only stores one back, not a stack)
  • | sets attributes of this file, in the format name=value (ignored on standard CLI)