Question: This Assembly Project will allow us to take user input. So far we've used the . text and . data sections in our programs. We

This Assembly Project will allow us to take user input. So far we've used the . text and . data sections in our programs. We will now use the .bss (Block Started by Symbol). It allows us to reserve space in memory for uninitialized variables. We will need these to store the user input. We have several options for the size: resb -1 byte resw -1 word (16 bits or 2 bytes) resd -1 double word (4 bytes) resq -1 quad word (8 bytes, also used for floats) rest -10 bytes, also used for extended floats In order to get user input, we will need to use a system call. So far, we have used two system calls: eax 1- system call exit (sys exit) eax 4- system call write (sys_write) For this lab, we will add: eax 3- system call read (sys_read) System calls take 3 arguments (we need to load three registers with values) besides the register EAX. For sys_read, we need: edx - loaded with the max bytes of space in memory ecx - loaded with the address of our variable (in the .bss section) ebx - loaded with the location we want to read from (in our casesthiN -standard input -keyboard)

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!