Skip to content

Instantly share code, notes, and snippets.

@ssvb
Created December 23, 2014 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssvb/4d8e19f8497f5c8886ec to your computer and use it in GitHub Desktop.
Save ssvb/4d8e19f8497f5c8886ec to your computer and use it in GitHub Desktop.
Test of the radare2 graphviz graphs
/* gcc -c test.S */
#ifdef __arm__
.syntax unified
#define sub subs
#define jz beq
#define jmp b
#define ret bx lr
#define eax r0
#else
.intel_syntax
#endif
mov %eax, 100
0:
sub %eax, 1
jz 2f
jmp 0b
nop
nop
nop
1:
nop
jmp 1b
nop
nop
nop
2:
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment