mikebharris / COBOL-brainfuck

A interpreter for the brainfuck language written in GnuCOBOL

Home Page:https://esolangs.org/wiki/Brainfuck

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

++++++++++[>+++++++>+++++++>++++++++++>+++>+<<<<<-]>>++.>+.+++++++..+++.>++.<<-----.<+++++++++.>-.<.---.>>>.+.>.

A interpreter for the brainfuck language written in GnuCOBOL. Probably history's most verbose programming language used to run programs in one of history's most minimalistic languages.

Compile with cobc -x -free brainfuck.cbl

Run with ./brainfuck hello.bf

Example

$ cd programs
$ cobc -x -free ../brainfuck.cbl
$ ./brainfuck hello.bf 
Program loaded - length is 00837 bytes
Hello COBOL !
$

Known issues and things to improve

  1. It is pretty darn slow
  2. The program mandelbrot.bf doesn't run correctly
  3. The program primes.bf doesn't run correctly
  4. Input (,) only takes a single character at a time and stores a single byte
  5. Reimplement using POINTERs
  6. Reimplement using speed-ups on looped blocks

About

A interpreter for the brainfuck language written in GnuCOBOL

https://esolangs.org/wiki/Brainfuck

License:GNU General Public License v3.0


Languages

Language:COBOL 56.6%Language:Brainfuck 43.4%