.section .data scanf_format: .asciz "%d" prompt: .asciz "Enter a number: " prompt2: .asciz "Enter another number: " result_message: .asciz "You entered %d\n" .section .text .globl main main: # Prompt the user for a number mov $prompt, %rdi mov $0, %rax call printf mov %rsp, %rbp sub $16, %rsp # Read the number with scanf mov $scanf_format, %rdi mov %rsp, %rsi call scanf # Prompt the user for a number mov $prompt2, %rdi mov $0, %rax call printf # Read the number with scanf mov $scanf_format, %rdi mov %rsp, %rsi call scanf # Print out the results mov $result_message, %rdi pop %rsi mov $0, %rax call printf # Print out the results mov $result_message, %rdi pop %rsi mov $0, %rax call printf # Exit the program with status 0 movl $1, %eax movl $0, %ebx int $0x80