-
#include<stdio.h>
-
int main()
-
{
-
int i;
-
int a[10];
-
for(i=0;i<=10;++i)
-
{
-
a[i]=0;
-
printf("%d\n",a[i]);
-
}
-
return 0;
- }
-
点击(此处)折叠或打开
-
.file "cs18.c"
-
.section .rodata
-
.LC0:
-
.string "%d\n"
-
.text
-
.globl main
-
.type main, @function
-
main:
-
pushl %ebp
-
movl %esp, %ebp
-
andl $-16, %esp
-
subl $64, %esp
-
movl $0, 60(%esp)
-
jmp .L2
-
.L3:
-
movl 60(%esp), %eax
-
movl $0, 20(%esp,%eax,4)
-
movl 60(%esp), %eax
-
movl 20(%esp,%eax,4), %edx
-
movl $.LC0, %eax
-
movl %edx, 4(%esp)
-
movl %eax, (%esp)
-
call printf
-
addl $1, 60(%esp)
-
.L2:
-
cmpl $10, 60(%esp)
-
jle .L3
-
leave
-
ret
-
.size main, .-main
-
.ident "GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-3)"
- .section .note.GNU-stack,"",@progbits