4Close6
squalylOn the 2014-07-23 at 12:48pm
il compte jusqu'à 1000, c'est osé comme initialiseur grin

gcc -O0 -fomit-frame-pointer -S

        .file   "test.c"
.globl i

        .bss
        .align 4
        .type   i, @object
        .size   i, 4
i:
        .zero   4

        .section        .rodata
.LC0:
        .string "%d\n"

        .text
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        andl    $-16, %esp
        subl    $16, %esp

        movl    i, %eax

        movl    %eax, %edx
        addl    $1, %eax

        movl    %eax, i
        movl    $.LC0, %eax
        movl    %edx, 4(%esp)
        movl    %eax, (%esp)
        call    printf

        movl    i, %eax
        cmpl    $1000, %eax
        jg      .L2

        movl    12(%ebp), %eax
        movl    %eax, 4(%esp)
        movl    8(%ebp), %eax
        movl    %eax, (%esp)
        call    main

        testl   %eax, %eax
        je      .L2

        movl    $1, %eax
        jmp     .L3

.L2:
        movl    $0, %eax

.L3:
        leave
        ret
        .size   main, .-main
        .ident  "GCC: (Debian 4.4.5-8) 4.4.5"
        .section        .note.GNU-stack,"",@progbits


smile