Question: USE MIPS - A real - estate database is constructed in C using an array of structs that holds data on houses. A program automatically
USE MIPS A realestate database is constructed in C using an array of structs that holds data on houses. A program automatically raises the taxes on each house by $ each year.
struct house
int sqft;
int taxes;
char address ;
;
int main
struct house homedbase ;
int ;
while
homedbase itaxes ;
a Show how to allocate space for the empty database using assembler directives. Assume that ints are bytes and chars are byte. Use the space directive with a label "homedbase:".
b On the back of this page, convert the while loop to assembly language. Use $ to for variable i and $ $ for other temporaries as needed.
Tips:
Write the basic while loop first and then put the memory accesses inside of it
Since NEs require registers, you'll need to put in a temporary.
You'll need to keep track of the offset from the base of the array to the current house's record
Use an additional counter register inside the loop that starts at the beginning of the homedbase and counts up by the size of the individual structs.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
