Assume X-$2ABI, Y-SACBF, SP = $CE06, A-SEA, B = $FB and CCR $0F a) The contents
ID: 3349521 • Letter: A
Question
Assume X-$2ABI, Y-SACBF, SP = $CE06, A-SEA, B = $FB and CCR $0F a) The contents of memory are shown in the table below. RTI instruction at the end of the ISR is executed, that is, ; part of the code ISR ; interrupt service routine part of the ISR code PULA; part of the ISR code RTI; being executed now What are the contents of each CPU register (PC, X, Y, CCR, SP, A and B) in the 68HC12 just after the RTI has been executed? MEMORY Address Data E03 E04 EO5 E06 E07 E08 E09 EOA EOB EOC EOD EOE EOF E10 12 A3 4E 59 EO SP 2D 4E 5F 80 PC =Explanation / Answer
When an ISR is executed the sequence in which the status registers are stored in Stack is
Content
Address
CCR
SP
A
SP - 1
B
SP - 2
X
SP - 3
Y
SP - 5
Return address
SP - 7
When RTI is executed the contents are retrieved in the same order. A, B, CCR are 8 bit registers and X, Y, PC are 16 bit registers.
CCR = $12
A = $A3
B = $4E
X = $59E0
Y = $00C1
PC = $2D4E
SP = $CE0F
Content
Address
CCR
SP
A
SP - 1
B
SP - 2
X
SP - 3
Y
SP - 5
Return address
SP - 7
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.