Question: Answer the following questions with respect to the MIPS program shown below. Assume that the data segment starts at 0 times 10010000 and that the

 Answer the following questions with respect to the MIPS program shown

Answer the following questions with respect to the MIPS program shown below. Assume that the data segment starts at 0 times 10010000 and that the text segment starts at 0 times 00400000. .data label:.word 24, 28 .byte 64, 32 .asciiz "Example Program" .text main:jal push jal pop li existv0, 10 syscall pop:lw existfp, 0(existsp) lw existra, 4(existsp) addi existsp, existsp, 32 ret1:jr existra push:addi existsp, existsp, -32 sw existfp, 0(existsp) sw existra, 4(existsp) ret2:jr existra a) Write the values of the words stored at the following memory locations. Provide your answer in hexadecimal notation. Word Address Value 0 times 10010008 0 times 0040000c 0 times 00400000 b) Consider the process of assembly of the above program, i) What would the symbol table in the output file contain? ii) What relocation information would be recorded if any? c) What are the values of the following labels? ret1: push: d) Assume that the procedure push and pop were assembled in a distinct file and statically linked with the main program. Further assume that the procedures (starting with the instruction labeled pop) are placed in the memory starting at location 0 times 00400040. Provide the encoding of the jal pop instruction

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!