Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please do not write in paper, write the code clear and easy to understand with explanation ,text 2. Write a program to do the following:
please do not write in paper, write the code clear and easy to understand with explanation
,text 2. Write a program to do the following: Load the word t and u into registers and subtract u from t. Store that result in ?. Load v and w into registers and subtract w from v, storing the result in y. Then multiply x times y and store the result in z. Output the numerical value of z to the console, and stop the program as usual. Remember: You can only perform mathematical operations on data that is in registers. data .word 100 .word 54 word 37 .word 23 .word 0 word 0 y: 3. The data declarations for the program below are done. First, use syscall 4 to output "Hello, world" Then, remembering that data can only be manipulated in registers, subtract data2 from datal. Then add that result to data3. Divide that result by data4, then multiply the resulting quotient by data 5. Store this final result in ans, and output the result also to the console. You do not have to output a CR/LF before outputting the final result, as there is a CR/LF at the end of Hello, world! text main: data str: .asciiz "Hello, world!n datal: word 51 data2:.word 37 data3:word 26 data4: word 49 data5: word 80 ans: .word 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started