mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-20 06:12:55 +00:00
Move the brainfuck arch platform description into a script ##arch
This commit is contained in:
parent
0c7f4e8d32
commit
5f95be9988
@ -1,4 +1,4 @@
|
||||
FILES=nes
|
||||
FILES=nes bf
|
||||
OPDIR=${DESTDIR}/$(DATADIR)/radare2/${VERSION}/platform
|
||||
|
||||
include ../../../config-user.mk
|
||||
|
5
libr/arch/d/bf-fini.r2
Normal file
5
libr/arch/d/bf-fini.r2
Normal file
@ -0,0 +1,5 @@
|
||||
o-fd.stack; f-fd.stack
|
||||
o-fd.screen; f-fd.screen
|
||||
o-fd.input; f-fd.input
|
||||
o-fd.data; f-fd.data
|
||||
e cmd.vprompt=
|
25
libr/arch/d/bf-init.r2
Normal file
25
libr/arch/d/bf-init.r2
Normal file
@ -0,0 +1,25 @@
|
||||
o malloc://128 0x3000
|
||||
f input 128 0x3000
|
||||
f fd.input=`oqq`
|
||||
|
||||
o malloc://80*25 0x4000
|
||||
f fd.screen=`oqq`
|
||||
f screen 80*25 0x4000
|
||||
|
||||
o malloc://0x200 0x5000
|
||||
f fd.stack=`oqq`
|
||||
f stack 0x200 0x5000
|
||||
|
||||
o malloc://0x1000 0x6000
|
||||
f fd.data=`oqq`
|
||||
f data 0x1000 0x6000
|
||||
|
||||
ar
|
||||
ar brk=stack
|
||||
ar scr=screen
|
||||
ar kbd=input
|
||||
ar ptr=data
|
||||
"e cmd.vprompt=pxa 32@stack;pxa 32@screen;pxa 32@data"
|
||||
s 0
|
||||
e asm.bits=32
|
||||
e cmd.vprompt=pxa 32@stack;pxa 32@screen;pxa 32@data
|
File diff suppressed because it is too large
Load Diff
@ -34,25 +34,6 @@ static RBinInfo *info(RBinFile *bf) {
|
||||
ret->bits = 32; // 16?
|
||||
ret->big_endian = 0;
|
||||
ret->dbg_info = 0;
|
||||
/* TODO: move this somewhere else */
|
||||
eprintf ("f input 128 0x3000\n");
|
||||
eprintf ("o malloc://128 0x3000\n");
|
||||
eprintf ("f screen 80*25 0x4000\n");
|
||||
eprintf ("o malloc://80*25 0x4000\n");
|
||||
eprintf ("f stack 0x200 0x5000\n");
|
||||
eprintf ("o malloc://0x200 0x5000\n");
|
||||
eprintf ("f data 0x1000 0x6000\n");
|
||||
eprintf ("o malloc://0x1000 0x6000\n");
|
||||
eprintf ("ar\n"); // hack to init
|
||||
eprintf ("ar brk=stack\n");
|
||||
eprintf ("ar scr=screen\n");
|
||||
eprintf ("ar kbd=input\n");
|
||||
eprintf ("ar ptr=data\n");
|
||||
eprintf ("\"e cmd.vprompt=pxa 32@stack;pxa 32@screen;pxa 32@data\"\n");
|
||||
eprintf ("s 0\n");
|
||||
eprintf ("e asm.bits=32\n");
|
||||
eprintf ("e cmd.vprompt=pxa 32@stack;pxa 32@screen;pxa 32@data\n");
|
||||
// eprintf ("dL bf\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user