Skip to content

Mayedl10/brainfuck_interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A configurable brainfuck interpreter!

make sure these files are in the same directory as the compiled interpreter: (with no file extensions, exactly as written below)

  • bfconfig
  • bfinput
  • bfout

This is the default content of the bfconfig file:

memsize:32768
wrap-tape:1
allow-overflow:1
file-read-default-char:0
get-input-from-console:0
output-to-console:0
continue-on-error:1
ignore-invalid:1
  • memsize: size of the memory tape
  • wrap-tape: set memPtr to 0 if it exceeds the memory size and vice versa
  • allow-overflow: do you want to have integer overflow?
  • file-read-default-char: uses this char if the input-file has rached its end
  • get-input-from-console: if false, it gets the input from bfinput. This also means, that the input can't be changed during runtime. Set to 1 if you want real-time input
  • output-to-console: if false, outputs to the bfout file.
  • continue-on-error: do you want to crash your program if you have an integer/memory index overflow?
  • ignore-invalid: crash on invalid character if set to 0

Build using g++: g++ -std=c++17 -Isrc src/*.cpp -o bf

About

A configurable brainfuck interpreter!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages