Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For these programming exercises, use only those instructions that have been discussed so far in these notes: add div mflo slt, slti addi divu mult

For these programming exercises, use only those instructions that have been discussed so far in these notes:

add div mflo slt, slti
addi divu mult sltu, sltiu
addiu j multu sra
addu lb nor srl
and lbu or sub
andi lh ori subu
beq lhu sb sw
bgez lui sh xor
bltz lw sll xori
bne mfhi

USING MARS Simulator

Write a program that stores the number 0 in the first four bytes of the .data section, then stores the number 1 in the next four bytes, then stores the number 2 in the four bytes after that and so on. Do this for numbers 0 through 24.

Of course you will do this in a counting loop. The address in the data section is contained in a base register. Increment the base register each time a number is stored.

The data section of your program should look like

 .data array: .space 100

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

More Books

Students also viewed these Databases questions

Question

1. Solve the equation 3x + 5 = 17. a) x = 6 c) x = 4 b) x=1 d) x=2

Answered: 1 week ago

Question

What is the use of bootstrap program?

Answered: 1 week ago

Question

What is a process and process table?

Answered: 1 week ago

Question

What is Industrial Economics and Theory of Firm?

Answered: 1 week ago

Question

Networking is a two-way street. Discuss this statement.

Answered: 1 week ago