This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 5th, 2013  |  syntax: ASM (NASM)  |  size: 1.10 KB  |  views: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.         int i = 0;
  5.         int k = 1;
  6.         k = ++i;
  7.         printf("k = %d",k);
  8. }
  9.  
  10. ///////////////////////////////////////////////////////
  11. DISASSEMBLY OF main()
  12. ///////////////////////////////////////////////////////
  13. 0000000000400594 <main>:
  14.   400594:       55                      push   %rbp
  15.   400595:       48 89 e5                mov    %rsp,%rbp
  16.   400598:       48 83 ec 10             sub    $0x10,%rsp
  17.   40059c:       c7 45 fc 00 00 00 00    movl   $0x0,-0x4(%rbp)
  18.   4005a3:       c7 45 f8 01 00 00 00    movl   $0x1,-0x8(%rbp)
  19.   4005aa:       83 45 fc 01             addl   $0x1,-0x4(%rbp)
  20.   4005ae:       8b 45 fc                mov    -0x4(%rbp),%eax
  21.   4005b1:       89 45 f8                mov    %eax,-0x8(%rbp)
  22.   4005b4:       8b 45 f8                mov    -0x8(%rbp),%eax
  23.   4005b7:       89 c6                   mov    %eax,%esi
  24.   4005b9:       bf bc 06 40 00          mov    $0x4006bc,%edi
  25.   4005be:       b8 00 00 00 00          mov    $0x0,%eax
  26.   4005c3:       e8 c8 fe ff ff          callq  400490 <printf@plt>
  27.   4005c8:       b8 00 00 00 00          mov    $0x0,%eax
  28.   4005cd:       c9                      leaveq
  29.   4005ce:       c3                      retq  
  30.   4005cf:       90                      nop
clone this paste RAW Paste Data