Zurück zu den Links
scan_format:
    .string "%d"
print_format:
    .string "%d\n"

.globl  main
main:
    movl    %esp, %ebp

    subl    $4, %esp        # allocate i on the stack
    pushl   %esp            # &i
    pushl   $scan_format
    call    __isoc99_scanf  # scanf("%d", &i)

    # increment i
    movl    -4(%ebp), %eax
    incl    %eax

    pushl   %eax            # i
    pushl   $print_format
    call    printf          # printf("%d\n", i)

    movl    %ebp, %esp      # clear stack