Question: Create a program using x 8 6 6 4 / GNU assembly syntax this is an example snippet of that: . section . data prompt:

Create a program using x8664/GNU assembly syntax this is an example snippet of that: .section .data
prompt: .asciz "Please enter a number: "
output: .asciz "You have entered:
"
.section .bss
buf: .skip 100
.section .text
.globl _start
_start:
mov $1,%rdi # File descriptor: STDOUT
mov $prompt, %rsi # Message to display
mov $23,%rdx # Length of the message
mov $1,%rax # System call number: write
syscall
mov $0,%rdi # File descriptor: STDIN
mov $buf, %rsi # Buffer to read into
mov $100,%rdx # Maximum number of bytes to read
mov $0,%rax # System call number: read
syscall
mov $1,%rdi # File descriptor: STDOUT
mov $output, %rsi # Message to display
mov $21,%rdx # Length of the message
mov $1,%rax # System call number: write
syscall I want the program to ask a user for a number than again for another number, then adds those numbers together and display it on the screen. For example: Enter a number:
5
Enter a number:
1
Heres the total:
6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!