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 twoStep 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 results

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!