7-10 MSC8101 User’s Guide
Interrupts and Interrupt Priorities
service routines to accommodate unlimited code size. The following example illustrates a
typical interrupt routine that uses a service routine. This example also demonstrates the
use of the ei and di instructions, which enable and disable IRs, respectively.
IPRB equ $00f01c38
...
org p:IRQ16
; interrupt routine for SIC
di ; disable any IR
jsr SIC_IRQ
nop
ei ; enable IR
rte
...
org p:SIC_IRQ
; clear pending interrupt in IRPB
move.w #$1,IPRB
; interrupt service routine to handle SIC
...
rts
7.4.3 EFCOP Programming Examples
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Interrupt Initialization ;
;
ELIR_A equ $7007 ; enable IRQ0 - IRQ3 ;
ELIR_B equ $0000 ; ;
IRQ0_SUB equ INIT ;
IRQ1_SUB equ INIT+$100 ;
IRQ2_SUB equ INIT+$200 ;
IRQ3_SUB equ INIT+$300 ;
IRQ4_SUB equ INIT+$400 ;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;; NM interrupt handle subroutine (SIC NMI vector) ;
;; ---------------------------------------------------------------- ;
;
org p:NMI7 ;
NMI
nmis 7 ;
rte ;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;; interrupt handle subroutine (input buffer not full) ;
;
org p:IRQ0 ;
irqs 0 ;
jsr IRQ0_SUB ;
Comments to this Manuals