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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

- 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.
.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)
Transcribed Image 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
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
Transcribed Image 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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 8 images

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education