Question
Step by step algorithm: First of all, I need to define two variable one is var1 and the other one is var2 which is stored
Step by step algorithm: First of all, I need to define two variable one is var1 and the other one is var2 which is stored with 15 and 19 respectively. After that, the program will print the address of them which is using la a0, var1 and var2 to print the address with address 268501020, and 268501024. Then, I use addi to increase var1 by 1 and use li t0, 4 and mul a0, a0, t0 to load the imm 4 and multiply with the var2. After that we will get 16 and 76. Finally, we need to swap the two number which var1 is 16 and var2 is 76. I use lw to load the word to the address and la for remember the address. After that sw to store back the word to the remember address. Please write code in assemply
Console resultsStep 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