
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Answer the following questions with respect to the MIPS program shown below. Assume that
the data segment starts at 0x10010000 and the text segment starts at 0x00400000.
A. What function does the last two instructions in the main program realize?
B. With respect to the above program,
- what are the values of the following symbols? - What is the total number of bytes required for this program, both data segment and text segment storage?
.data .word 0x21, 32 .byte 4, 3
.ascii”Test”
.text li $4, 4 jal func slt $7, $0, $ bne $7, $0,loop
li $v0, 10 syscall
addi $4, $4, - jr $
first:
str:
main: loop:
func:
.align 2
end:
Program Exit.
end __0x00400014_____________
loop __0x04000004_____________
func __0x04000018_____________
str __0x1001000c_____________
data segment - 16 text segment - 32