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 »
Assembly programming (HC12) and using code warrior.Stack and Subs Practice Work.



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 LDAA #$27 PSHA LDAA #$6E PSHA LDY #$ABCD PSHY JSR MY_SUB b) LDS #$B010 LDX #$E49F PSHX DES LDX #$927C PSHX DES LDAA #$D4 PSHA PULB JSR 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 RMB $20 STKBTM RMB 1 ORG $D100 TEMP1 FCB $77 TEMP2 FCB $F3 ORG $0800 MAIN LDS #STKBTM LDX #TEMP1 PSHX LDY TEMP1 PSHY LDAA #$50 SUBA #$10 PSHA PSHC LDAB #$76 SUBB TEMP1 PSHB PSHC LDX #$5 LDD #!1003 IDIV PSHB PSHX JSR MY_SUB LOOPBACK LDAA #$14 INF_LOOP BRA INF_LOOP ORG $0900 MY_SUB LDAB #$56 PSHB INS NOP … Stack Frame for problem 2:
Answered Same DayApr 06, 2021

Answer To: Stack_and_Frames ECE347 Stack and Subs Practice Work PI = 4 1. Show what the stack frame would look...

Gaurav answered on Apr 08 2021
147 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