- What is the address of an integer that was first pushed on to stack? - What is the value in Hex and signed decimal of an integer that was first pushed on to stack? - What is the offset from FRAME...


- What is the address of an integer that was first pushed on to stack?
- What is the value in Hex and signed decimal of an integer that was first pushed on to stack?
- What is the offset from FRAME POINTER to an integer that was first pushed on to stack?
- What is the address of an integer that was Last pushed on to stack?
- What is the value in Hex and signed decimal of an integer that was Last pushed on to stack?
- What is the offset from FRAME POINTER to an integer that was Last pushed on to stack?
- Based on the data shown Figure 2.,Can you determine if Frame pointer points to an address or a value? Please circle around your answer. Please explain.


A student wrote MIPS assembly program and executed it in MARS simulator.<br>.data<br>arrayl: .word -1,0x7fffffff,0x10000080,0x80000010<br>.text<br>main:<br>la șt1, arrayl<br># create Frame pointer<br>add $fp,$zero,$sp<br>#Store the address of the first element on stack<br>using frame pointer<br>sw $t1,0 ($fp)<br>#allocate memory on Stack for 6 integers<br>addi $sp,$sp,-24<br>#load FIRST element from arrayl [0] to register $s0<br>lw $s0,0 ($t1)<br>#push $s0 (NO PUSH!)i.e. store register $s0<br>on #top of the stack<br>sw $s0,0 ($sp)<br>#load SECOND element from arrayl[1] to register $s0<br>lw $s0,4 ($t1)<br>#create new top of the stack<br>addi $sp,$sp,-4<br>sw $s0,0 ($sp)<br>#load third element from array1[2] to register<br>$0<br>Iw $$0,8($t1)<br>#create new top of the stack<br>addi $sp,$sp,-4<br>sw $0,0(sp)<br>#load forth element from array1[3] to register<br>$s0<br>Iw $s0,12($t1)<br>#create new top of the stack<br>addi $sp,$sp,-4<br>sw $$0,0($sp)<br>

Extracted text: A student wrote MIPS assembly program and executed it in MARS simulator. .data arrayl: .word -1,0x7fffffff,0x10000080,0x80000010 .text main: la șt1, arrayl # create Frame pointer add $fp,$zero,$sp #Store the address of the first element on stack using frame pointer sw $t1,0 ($fp) #allocate memory on Stack for 6 integers addi $sp,$sp,-24 #load FIRST element from arrayl [0] to register $s0 lw $s0,0 ($t1) #push $s0 (NO PUSH!)i.e. store register $s0 on #top of the stack sw $s0,0 ($sp) #load SECOND element from arrayl[1] to register $s0 lw $s0,4 ($t1) #create new top of the stack addi $sp,$sp,-4 sw $s0,0 ($sp) #load third element from array1[2] to register $0 Iw $$0,8($t1) #create new top of the stack addi $sp,$sp,-4 sw $0,0(sp) #load forth element from array1[3] to register $s0 Iw $s0,12($t1) #create new top of the stack addi $sp,$sp,-4 sw $$0,0($sp)
After execution of the program in MARS simulator, he displayed the following memory windows and<br>register file:<br>t tegmet<br>te<br>te<br>TEI<br>tecml a DA<br>O Data Segment<br>Value (+0)<br>Address<br>Ох10010000<br>Ox10010020<br>Ox10010040<br>Ox10010060<br>Ox10010080<br>Ox100100a0<br>Ox100100c0<br>Ox100100e0<br>Ox10010100<br>Value (+8)<br>Оx100000е0<br>Ox00000000<br>Ox00000000<br>Ох00000000<br>Ох00000000<br>Ох00000000<br>Value (+4)<br>Value (+c)<br>Ox80000010<br>Ox00000000<br>Va<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000l<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ох0000<br>Ox000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox00000000<br>Ox10010000 (.data)<br>V Hexadecimal Addresses<br>Registers<br>Coproc 1<br>Сергос о<br>Name<br>Number<br>Value<br>$zero<br>Gat<br>Ox00000000<br>Ox10010000<br>Ox0000000a<br>Ox00000000<br>Ox00000<br>Sal<br>Ga2<br>Ox00000<br>Ox00000<br>7<br>Ox00000<br>Ox00000<br>Ox1001<br>St2<br>10<br>Ox00000<br>12<br>Ox000000<br>13<br>Ox00000<br>14<br>Ox0000<br>15<br>Ox000<br>16<br>17<br>10<br>19<br>Ox8000<br>ON000<br>Eal<br>Ox0000<br>Ox00<br>20<br>21<br>Ox000<br>ONO00<br>Ox0000<br>ON00000<br>22<br>23<br>24<br>25<br>Ox0000<br>ko<br>26<br>27<br>28<br>29<br>Ox00000<br>Ox00000<br>Egp<br>Gap<br>Ox100000<br>Ox7ttteta8<br>30<br>Ox7ttteftc<br>31<br>Ox0000000<br>pe<br>hi<br>Ox00400044<br>Ox00000000<br>Ox00000000<br>

Extracted text: After execution of the program in MARS simulator, he displayed the following memory windows and register file: t tegmet te te TEI tecml a DA O Data Segment Value (+0) Address Ох10010000 Ox10010020 Ox10010040 Ox10010060 Ox10010080 Ox100100a0 Ox100100c0 Ox100100e0 Ox10010100 Value (+8) Оx100000е0 Ox00000000 Ox00000000 Ох00000000 Ох00000000 Ох00000000 Value (+4) Value (+c) Ox80000010 Ox00000000 Va Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000l Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ох0000 Ox000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox10010000 (.data) V Hexadecimal Addresses Registers Coproc 1 Сергос о Name Number Value $zero Gat Ox00000000 Ox10010000 Ox0000000a Ox00000000 Ox00000 Sal Ga2 Ox00000 Ox00000 7 Ox00000 Ox00000 Ox1001 St2 10 Ox00000 12 Ox000000 13 Ox00000 14 Ox0000 15 Ox000 16 17 10 19 Ox8000 ON000 Eal Ox0000 Ox00 20 21 Ox000 ONO00 Ox0000 ON00000 22 23 24 25 Ox0000 ko 26 27 28 29 Ox00000 Ox00000 Egp Gap Ox100000 Ox7ttteta8 30 Ox7ttteftc 31 Ox0000000 pe hi Ox00400044 Ox00000000 Ox00000000
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here