Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago