1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| .file "testStringInASM.c"
.section .rodata
.LC0:
.string "%d\n"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $36, %esp
movl $0, -8(%ebp)
movl -8(%ebp), %eax
movl stderr, %edx
movl %eax, 8(%esp)
movl $.LC0, 4(%esp)
movl %edx, (%esp)
call fprintf
#APP
movl $9, -8(%ebp)
#NO_APP
movl -8(%ebp), %eax
movl stderr, %edx
movl %eax, 8(%esp)
movl $.LC0, 4(%esp)
movl %edx, (%esp)
call fprintf
movl $0, %eax
addl $36, %esp
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)"
.section .note.GNU-stack,"",@progbits |
Partager