forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrainfuck
32 lines (24 loc) · 989 Bytes
/
brainfuck
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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