.file "five.c" .version "01.01" gcc2_compiled.: .section .rodata .LC0: .string "%d plus %d equals %d\n" .text .align 4 .globl main .type main,@function main: pushl %ebp # Save old frame pointer movl %esp,%ebp # Set up a new frame pointer subl $4,%esp # Reserve four bytes for local variables movb $49,-1(%ebp) # Initializing num1 to '1' addb $-48,-1(%ebp) # Convert ASCII 1 to a binary 1 movb $50,-2(%ebp) # Initializing num2 to '2' addb $-48,-2(%ebp) # Convert ASCII 2 to binary 2 movb -1(%ebp),%al # Set up num1 in the accumulator movb -2(%ebp),%dl # Set up num2 in the data register addb %dl,%al # Compute the total movb %al,%dl # Save the result in the data register movb %dl,-3(%ebp) # Save the result in total movsbl %dl,%eax # Set up last argument to printf - total pushl %eax movsbl -2(%ebp),%eax # Push num2 pushl %eax movsbl -1(%ebp),%eax # Push num1 pushl %eax pushl $.LC0 # Push pointer to printf string call printf addl $16,%esp # erase arguments from stack .L1: leave ret .Lfe1: .size main,.Lfe1-main .ident "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"