Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Stack_and_Frames ECE347 Stack and Subs Practice Work PI = 4 1. Show what the stack frame would look like for each of the following examples. It is okay to use RTN_Hi and RTN_Lo to indicate return...

1 answer below »
Stack_and_Frames
ECE347 Stack and Subs Practice Work
PI = 4
1. Show what the stack frame would look like for each of the following examples. It
is okay to use RTN_Hi and RTN_Lo to indicate return address.
a)
LDS #$100A
XXXXXXXXXXLDAA #$27
XXXXXXXXXXPSHA
XXXXXXXXXXLDAA #$6E
XXXXXXXXXXPSHA
XXXXXXXXXXLDY #$ABCD
XXXXXXXXXXPSHY
XXXXXXXXXXJSR MY_SUB









)
XXXXXXXXXXLDS #$B010
XXXXXXXXXXLDX #$E49F
XXXXXXXXXXPSHX
XXXXXXXXXXDES
XXXXXXXXXXLDX #$927C
XXXXXXXXXXPSHX
DES
LDAA #$D4
XXXXXXXXXXPSHA
XXXXXXXXXXPULB
XXXXXXXXXXJSR MY_SUB













2. Determine the value of the stack pointer and the contents of the stack frame after
the NOP is executed in the code segment shown. Use the stack picture included on
page 3 to show your answers.
ORG $A000
STKTOP XXXXXXXXXXRMB $20
STKBTM RMB XXXXXXXXXX
ORG $D100
TEMP1 XXXXXXXXXXFCB $77
TEMP2 XXXXXXXXXXFCB $F3
ORG $0800
MAIN LDS #STKBTM
LDX #TEMP1
PSHX
LDY TEMP1
PSHY
LDAA #$50
SUBA #$10
XXXXXXXXXXPSHA
XXXXXXXXXXPSHC
LDAB #$76
SUBB XXXXXXXXXXTEMP1
XXXXXXXXXXPSHB
XXXXXXXXXXPSHC
XXXXXXXXXXLDX #$5
XXXXXXXXXXLDD #!1003
IDIV
XXXXXXXXXXPSHB
PSHX
JSR MY_SUB
LOOPBACK XXXXXXXXXXLDAA #$14
INF_LOOP XXXXXXXXXXBRA XXXXXXXXXXINF_LOOP
ORG $0900
MY_SUB XXXXXXXXXXLDAB #$56
XXXXXXXXXXPSHB
XXXXXXXXXXINS
NOP
…
Stack Frame for problem 2:
Answered Same Day Apr 06, 2021

Solution

Gaurav answered on Apr 08 2021
149 Votes
$100A
    
    $1009
    $27
    $1008
    $6E
    $1007
    $CD
    $1006
    $AB
    $1005
    $RTN_Lo
    $1004
    $RTN_Hi
    $1003
    
A)    LDS #$100A
    LDAA #$27
    PSHA
    LDAA #$6E
    PSHA
    LDY #$ABCD
    PSHY
    JSR...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here