Question: 1. The data segment of a program starts at 0x10010000. Write the MIPS assembly language code to do the following. Do not use pseudo-instructions. a.

1. The data segment of a program starts at 0x10010000. Write the MIPS assembly language code to do the following. Do not use pseudo-instructions.

a. put the address of the start of the data segment in $t0

b. read the word at the beginning of the data segment into $t1

c. add 1 to the value in $t1

d. write the value back into memory at the same location (where it was read).

2. Select the correct answer. Consider the following instruction

addi $s0, $s0, -1

Before the add is performed, what happens?

a

THe value -1 is extended to 32 bits and zero filled.

b.

$s0 is truncated to 16 bits.

c.

The value of in $s0 is changed to a negative number.

d.

The value -1 is sign extended to 32 bits.

3. The following data segment starts at 0x10010000. What is the address of the value 5? Be sure to respresent your answer as 8 hexadecimal digits with the leading 0x.

.data

.word 1, 4

.word 5

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!