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 851bc022c1 Update lib/error to version 1.0.2 4 months ago
examples Add mandelbrot example program 10 months ago
src Update lib/error to version 1.0.2 4 months ago
.gitignore Update gitignore 5 months ago
BuildUNIX.sh Update project build files 10 months ago
BuildWindows.bat Add Windows build script 4 months ago
CMakeLists.txt Update lib/error to version 1.0.2 4 months ago
LICENCE Update licence 10 months ago
README.md Change behaviour on EOF to 0 instead of -1 10 months ago

README.md

OBFI

OMKOV Brainfuck Interpreter

The OMKOV Brainfuck Interpreter (OBFI) is a minimal 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.

Build Instructions

OBFI uses CMake to build.
Binaries will be located in the bin directory.

UNIX Build

Run BuildUNIX.sh, or

cmake -S . -B build && cmake --build build

Meta

Copyright (C) 2020, Jakob Wakeling
All rights reserved.
OMKOV Permissive Licence