radare2/doc/brainfuck.md

38 lines
1.0 KiB
Markdown
Raw Normal View History

Brainfuck support for r2
========================
Plugins for brainfuck:
2018-02-27 09:54:54 +00:00
- `asm.bf` - brainfuck assembler and disassembler
- `debug.bf` - debugger using bfvm
- `anal.bf` - code analysis for brainfuck
- `bp.bf` - breakpoints support (experimental)
To debug a brainfuck program:
2018-02-27 09:54:54 +00:00
r2 -D bf bfdbg:///tmp/bf
2018-02-27 09:54:54 +00:00
> dc # continue
> x@scr # show screen buffer contents
The debugger creates virtual sections for code, data, screen and input.
TODO
----
- add support for comments, ignore invalid instructions as nops
2017-09-30 09:58:41 +00:00
- enhance io and debugger plugins to generate sections and set arch opts
Hello World
===========
2018-02-27 09:54:54 +00:00
```
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]
>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++
.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
2018-02-27 09:54:54 +00:00
```
2018-02-27 09:54:54 +00:00
```
$ cat << EOF
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
EOF
2018-02-27 09:54:54 +00:00
```