Question: i need help so i created this program which will be below but i need to revert this code to fit the prompt below f

i need help so i created this program which will be below but i need to revert this code to fit the prompt below
f =(g + h -3)-(i +7)
instead of starting with the variables in registers, instead read the 3 inputs from memory locations defined in a data section of your program, and output the result to another location in the data section.
Save the code in a file named hw7.asm,
Test the code using the RARS simulator to verify your code is written correctly.
Example of my old code
lw x10,0(x21) # Load g into register x10
lw x11,0(x22) # Load h into register x11
lw x12,0(x23) # Load i into register x12
add x20, x10, x11 # Calculate (g + h)
addi x20, x20,-3 # Subtract 3 from (g + h), result in x20
addi x13, x12,7 # Calculate (i +7), store in temporary register x13
sub x20, x20, x13 # Subtract (i +7) from (g + h -3), result in x20

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!