View Single Post
Old Feb 21st, 2005, 3:29 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
        .file   "test.c"
        .text
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $24, %esp
        andl    $-16, %esp
        movl    $0, %eax
        subl    %eax, %esp
        movl    $0, -4(%ebp)
        movl    $10, -8(%ebp)
        movl    $100, -12(%ebp)
        movl    $15, -16(%ebp)
.L2:
        cmpl    $0, -16(%ebp)
        jns     .L5
        jmp     .L3
.L5:
        movl    -8(%ebp), %eax
        leal    -4(%ebp), %edx
        addl    %eax, (%edx)
        movl    -4(%ebp), %eax
        cmpl    -12(%ebp), %eax
        jl      .L4
        movl    -8(%ebp), %edx
        leal    -4(%ebp), %eax
        addl    %edx, (%eax)
.L4:
        leal    -16(%ebp), %eax
        decl    (%eax)
        jmp     .L2
.L3:
        movl    $0, %eax
        leave
        ret
        .size   main, .-main
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-3)"
__________________

tempest is offline   Reply With Quote