ccmny

Hello worldx5 assembly

Sep 11th, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "hw2.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.     pushl   %ebp
  11.     movl    %esp, %ebp
  12.     andl    $-16, %esp
  13.     subl    $32, %esp
  14.     call    ___main
  15.     movl    $0, 28(%esp)
  16.     jmp L2
  17. L3:
  18.     movl    $LC0, (%esp)
  19.     call    _puts
  20.     incl    28(%esp)
  21. L2:
  22.     cmpl    $4, 28(%esp)
  23.     jle L3
  24.     movl    $0, %eax
  25.     leave
  26.     ret
  27.     .def    _puts;  .scl    2;  .type   32; .endef
Advertisement
Add Comment
Please, Sign In to add comment