Advertisement
tmcopeland

C Printf in ASM

Mar 5th, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "c-simple-print.c"
  2.     .def    ___main;    .scl    2;  .type   32; .endef
  3.     .section .rdata,"dr"
  4. LC0:
  5.     .ascii "Hello, World!\0"
  6.     .text
  7.     .globl  _main
  8.     .def    _main;  .scl    2;  .type   32; .endef
  9. _main:
  10. LFB6:
  11.     .cfi_startproc
  12.     pushl   %ebp
  13.     .cfi_def_cfa_offset 8
  14.     .cfi_offset 5, -8
  15.     movl    %esp, %ebp
  16.     .cfi_def_cfa_register 5
  17.     andl    $-16, %esp
  18.     subl    $16, %esp
  19.     call    ___main
  20.     movl    $LC0, (%esp)
  21.     call    _printf
  22.     movl    $0, %eax
  23.     leave
  24.     .cfi_restore 5
  25.     .cfi_def_cfa 4, 4
  26.     ret
  27.     .cfi_endproc
  28. LFE6:
  29.     .def    _printf;    .scl    2;  .type   32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement