Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "hw2.c"
- .def ___main; .scl 2; .type 32; .endef
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- pushl %ebp
- movl %esp, %ebp
- andl $-16, %esp
- subl $16, %esp
- call ___main
- movl $5, (%esp)
- call _hello
- leave
- ret
- .section .rdata,"dr"
- LC0:
- .ascii "Hello, world!\0"
- .text
- .globl _hello
- .def _hello; .scl 2; .type 32; .endef
- _hello:
- pushl %ebp
- movl %esp, %ebp
- subl $40, %esp
- movl $0, -12(%ebp)
- jmp L3
- L4:
- movl $LC0, (%esp)
- call _puts
- incl -12(%ebp)
- L3:
- movl -12(%ebp), %eax
- cmpl 8(%ebp), %eax
- jl L4
- leave
- ret
- .def _puts; .scl 2; .type 32; .endef
Add Comment
Please, Sign In to add comment