
82 CHAPTER 7. INTERRUPT PROCESSING
Last two bits of PACTL Time between interrupts
00 4.096 ms (244.1 Hz)
01 8.192 ms (122 Hz)
10 16.384 ms (61 Hz)
11 32.768 ms (30.5 Hz)
Thus if we want to use the RTI interrupt, we have to change the above code as
shown below. Note the crucial differences:
; Various defines go here ...
ORG $3000 don’t forget the $
ME FCC /Your name/
FCB 10
FCC /ECE 372/
FCB 10
FCC /Date the program was last changed/
FCB 10, 10, 4
ORG $2000 DONT FORGET THE $
LDX #ME
JSR OUTSTRG ; MAKE SURE YOU HAVE EQU FOR OUTSTRG
LOOP1
; Enable RTIF interrupt by setting RTII (bit#6 in TMSK2)
SEI
LDAA #%01000000 <= This is different
STAA TMSK2
LDAA #%00000011 <= THIS IS NEW
STAA PACTL
CLI
; Now go about your business of printing Z’s
LDAA #’Z’
LOOP JSR OUTA
BRA LOOP
; End of main program
Comentarios a estos manuales