radare2/libr/egg/t/hi.r
pancake 0217c146ef * Fix x86.nz -> push [esp+N]
* Use pw instead of px in debugger stack view
* Disable stackptr by default
* Add OSX-32bit debugger register map
  - Fix support for debugging 32bit bins in 64bit OSes
* Implement r_egg_run() -- just in time execution
* Fix r_egg string construction and argument passing
  - Still needs more work, but at least some hello worlds work
2011-09-21 19:51:09 +02:00

31 lines
517 B
R
Executable File

#!/usr/bin/ragg2 -FO
goto(main);
exit@syscall(1);
write@syscall(4);
@syscall() {
: mov eax, `.arg`
: push eax
: int 0x80
// restore stack
: add esp, 4
}
dowrite@() {
write (1, .arg0, .arg4);
}
/* this call is failing as long as .arg access is wrong */
dowritefail@(128) {
write (1, .arg0, .arg4);
}
main@global(128,128) {
// dowrite ("foo\nbla\n", 8);
dowritefail ("foo\nbla\n", 8);
write (1, "hiz\n", 4);
write (1, "Hello World\n", 12);
write (1, "Hello rld\n", 10);
exit (0);
}