Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedStep 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions