For the interpreter, just execute make run
If you don't know what cool things you could do in Brainfuck, how about trying this?
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
There is also a brainfuck compiler that generates native Commodore 128 "prg"s
that can be loaded via dload
.
To run the compiler, execute make bfc128.prg
; then dload "bfc128.prg"
in
VICE and just run it.
The compiler will ask you for the program, as well as the file name of the prg it should create
The data pointer is 8 bit, so you're limited to 256 bytes of data.
$1c01 - $1cff: Standard BASIC header and padding $1d00 - $1dff: 256 bytes of data $1e00 - ...: Executable code
The X register is used as the data pointer
>
| INX
<
| DEX
'+' | INC $1D00,X
'-' | DEC $1D00,X
'.' | LDA $1D00,x; JSR $FFD2
',' | JSR $FFCF; STA $1D00,X
'[' | LDA $1D00,X; BNE +3; JMP XXXX
']' | LDA $1D00,X; BEQ +3; JMP XXXX
x128 \
-fs8 `pwd` \
-fs8convertp00 \
-iecdevice8
It seems that you can only write to disk images in x128 if you set "Use IEC drive" to true.