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
- 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 typingALT+10
(numbers on numpad). - 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.