rizin/libr/egg/t/loop.r
pancake 1f7f9dc036 * Enhacements for rarun2
- add 'timeout' directive
  - directives can now be passed in arguments
  - support more than 3 args for launching
  - show default config file in help
* Added test suite for r_egg
  - Fix nested conditional and loops
  - Some situations can result in broken code
  - Code needs a huge cleanup
* Varioues fixes for x86.nz plugin to make r_egg happy
* Install python plugins into dist-packages only
  - site-packages is not the right place
* Add R2_LIBDIR and R2_PREFIX constants
* Honor LIBDIR in sdbpath for r_syscall
* Fix rabin2 -h for -C
2011-10-24 04:35:42 +02:00

47 lines
585 B
R

/* TODO: all bins must contain a jmp main */
/* entrypoint */
//main();
goto(main);
//:jmp main
puts@global() {
//write(1,.arg0);
/* do nothing */
: mov edx, 3
/* : mov ecx, 0x10000002a */
: mov ecx, `.arg0`
: mov ebx, 1
: mov eax, 4
: push eax
: int 0x80
: pop eax
}
exit@global() {
: mov ebx, `.arg0`
: mov eax, 1
: push eax
: int 0x80
: add esp, 4
}
main@global(128) {
.var0 = 3;
.var4 = "counter";
exit(0);
{
puts(.var4);
.var0 -= 1;
} while(.var0);
/* comment */
.var0 = 3;
.var4 = "coconut";
while(.var0) {
puts(.var4);
.var0 -= 1;
}
0;
}