Docsity

Embedded Systems Exam 2 - Fall 2007 - MacDonald, Exams of Microprocessors

Toggle sidebar
bg1
EE3376 โ€“ Embedded Systems - Fall 2007 - Exam 2 โ€“ MacDonald โ€“ Page 1
Student Name:_______________________________ Student ID: _______________
Problem 1
A section of the main program is running shown below and is in the middle of
executing the inx instruction when a RTI periodic interrupt occurs. The ISR is
shown in below as well and is a contrived example. Fill out the table describing
register and memory values at different points throughout the sequence
MAIN CODE ISR
---------------------------------------- ----------------------------------
rti_isr: ldy A, X
inca iny
inx IRQ occurs here inca
ldy A, X sty A, X
rti
Table 1
Location Prior to INCA Just after INX
Just after RTI Just after LDY
reg A $0F
reg B $08
reg D
reg X $1FF0
reg Y $0000
Mem $2000 $12
Mem $2001 $34
Mem $2002 $56
Mem $2003 $78
pf3

Partial preview of the text

Download Embedded Systems Exam 2 - Fall 2007 - MacDonald and more Exams Microprocessors in PDF only on Docsity!

Student Name:_______________________________ Student ID: _______________ Problem 1 A section of the main program is running shown below and is in the middle of executing the inx instruction when a RTI periodic interrupt occurs.shown in below as well and is a contrived example. Fill out the table describing The ISR is register and memory values at different points throughout the sequence

MAIN CODE ISR

rti_isr: ldy A, X inca iny

inx IRQ occurs here inca

ldy A, X styrti A, X

Table 1

Location Prior to INCA Just after INX Just after RTI Just after LDY reg A $0F reg B $ reg D reg X $1FF reg Y $ Mem $2000 $ Mem $2001 $ Mem $2002 $ Mem $2003 $

Student Name:______________________________ Student ID: _______________ Problem 2 (30 pts) Write an initialization subroutine for the Real Time Interrupt so that it will interrupt approximately every 4 uS.find the address in the register section of your class notes.). (Hint: RTR values are below and you can

Show calculations for any credit. Use actual addresses for registers.