Ruslan Popov's personal website

Student of DNU Faculty of Physics, Electronics and Computer Systems


Home | Github | Projects | Papers

Source: Github repository.

Description

bf-translator - Brainfuck language interpreter and translator to DOS MASM assembler.
Generates .ASM files, needs to be compiled by MASM.
Tested on programs from http://brainfuck.org/ with MASM 6.11 in DOSBox.
WIRTTEN FOR EDUCATIONAL PURPOSES.
Stability and correctness are not guaranteed.

Usage

First argument is brainfuck file, second is output .asm file.
If no second argument provided, the brainfuck program is interpreted.

Known issues

  1. When Enter key is pressed on Windows, the terminal sends \n to program, but DOS sends \c. Because many brainfuck programs use \n, you can send it by typing ALT+10(numbers on numpad).
  2. By default many terminals are running in canonical mode, but this translator is using direct key input from DOS (mov ah, 01h, int 21h). This causes not pretty output.

Copyright (c) 2023 Ruslan Popov

My email: ruslanpopov1512@gmail.com; popov_ro@ffeks.dnu.edu.ua.

You can find me everywhere by this nickname: InAnYan.