mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-15 09:21:00 +00:00
8de9123520
* Fully implement the asm.bf assembler and disassembler - Syntax fixed. disassembled code can be reassembled - Added support for misd instructions (multiple instruction single data) rasm2 -a bf 'add [ptr], 8;trap,64;nop;poke;'
33 lines
989 B
Plaintext
33 lines
989 B
Plaintext
Brainfuck support for r2
|
|
========================
|
|
|
|
Plugins for brainfuck:
|
|
- 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:
|
|
|
|
$ r2 -D bf bfdbg:///tmp/bf
|
|
|
|
> 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
|
|
- enhace io and debugger plugins to generate sections and set arch opts
|
|
|
|
Hello World
|
|
===========
|
|
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]
|
|
>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++
|
|
.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
|
|
|
|
$ cat << EOF
|
|
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
|
|
EOF
|