Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

tmp.s

By: a guest on Apr 3rd, 2014  |  syntax: ASM (NASM)  |  size: 0.81 KB  |  views: 30  |  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.         .file   "tmp.c"
  2.         .section        .rodata
  3. .LC0:
  4.         .string "A: %d, B: %d\n"
  5.         .text
  6.         .globl  f
  7.         .type   f, @function
  8. f:
  9. .LFB0:
  10.         .cfi_startproc
  11.         pushq   %rbp
  12.         .cfi_def_cfa_offset 16
  13.         .cfi_offset 6, -16
  14.         movq    %rsp, %rbp
  15.         .cfi_def_cfa_register 6
  16.         subq    $16, %rsp
  17.         movl    %edi, -4(%rbp)
  18.         movl    %esi, -8(%rbp)
  19.         movl    $.LC0, %edi
  20.         movl    $0, %eax
  21.         call    printf
  22.         leave
  23.         .cfi_def_cfa 7, 8
  24.         ret
  25.         .cfi_endproc
  26. .LFE0:
  27.         .size   f, .-f
  28.         .globl  main
  29.         .type   main, @function
  30. main:
  31. .LFB1:
  32.         .cfi_startproc
  33.         pushq   %rbp
  34.         .cfi_def_cfa_offset 16
  35.         .cfi_offset 6, -16
  36.         movq    %rsp, %rbp
  37.         .cfi_def_cfa_register 6
  38.         movl    $2, %esi
  39.         movl    $1, %edi
  40.         movl    $0, %eax
  41.         call    f
  42.         movl    $0, %eax
  43.         popq    %rbp
  44.         .cfi_def_cfa 7, 8
  45.         ret
  46.         .cfi_endproc
  47. .LFE1:
  48.         .size   main, .-main
  49.         .ident  "GCC: (Debian 4.7.2-5) 4.7.2"
  50.         .section        .note.GNU-stack,"",@progbits
clone this paste RAW Paste Data