Skip to content

Instantly share code, notes, and snippets.

@jsjohnst
Created December 15, 2011 03:40
Show Gist options
  • Save jsjohnst/1479728 to your computer and use it in GitHub Desktop.
Save jsjohnst/1479728 to your computer and use it in GitHub Desktop.
0000000100000f10 pushq %rbp
0000000100000f11 movq %rsp,%rbp
0000000100000f14 subq $0x20,%rsp
0000000100000f18 movl %edi,0xfc(%rbp)
0000000100000f1b movq %rsi,0xf0(%rbp)
0000000100000f1f xorb %al,%al
0000000100000f21 leaq 0x0000003c(%rip),%rcx
0000000100000f28 movq %rcx,%rdi
0000000100000f2b callq 0x100000f38 ; symbol stub for: _printf
0000000100000f30 jmp 0x100000f1f
#include <stdio.h>
#define forever for(;;)
int main(int argc, char **argv) {
forever {
printf("Hi");
}
}
0000000100000f10 pushq %rbp
0000000100000f11 movq %rsp,%rbp
0000000100000f14 subq $0x20,%rsp
0000000100000f18 movl %edi,0xfc(%rbp)
0000000100000f1b movq %rsi,0xf0(%rbp)
0000000100000f1f xorb %al,%al
0000000100000f21 leaq 0x0000003c(%rip),%rcx
0000000100000f28 movq %rcx,%rdi
0000000100000f2b callq 0x100000f38 ; symbol stub for: _printf
0000000100000f30 jmp 0x100000f1f
#include <stdio.h>
int main(int argc, char **argv) {
while(1) {
printf("Hi");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment