OMKOV Brainfuck Interpreter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

898 B

OBFI

OBFI is a minimal and performant Brainfuck interpreter.

Implementation Details

  • OBFI uses single octet cells, and arithmetic wraps around.
  • OBFI provides 30000 cells.
  • OBFI does not perform array bound checking.
  • OBFI will set the current cell to 0 when EOF is encountered.

Optimisations

  • Compress > and < instructions.
  • Compress + and - instructions.
  • Replace [+] and [-] with a 'set to zero' instruction.
  • Replace [>] and [<] with a 'go to zero' instruction.
  • Replace [+>+>] and [>+>+] with a 'move to' instruction.
  • Replace [-<-<] and [<-<-] with a 'move to' instruction.

Usage

Dependencies

  • CMake >= 3.12, to build

Building

To build OBFI on UNIX, run BuildUNIX.sh.

  • Binaries will be located in the bin directory.

Meta

Copyright (C) 2020, Jakob Wakeling
MIT Licence