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.
 
 
 
 
Jake Wakeling 4ec6ac1f2c Relicense to MIT 9 months ago
examples Add mandelbrot example program 2 years ago
src Relicense to MIT 9 months ago
.gitignore Relicense to MIT 9 months ago
BuildUNIX.sh Update project build files 2 years ago
BuildWindows.bat Add Windows build script 2 years ago
CMakeLists.txt Update libutil 9 months ago
LICENCE Relicense to MIT 9 months ago
README.md Relicense to MIT 9 months ago

README.md

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