
424
CHAPTER 14 DTP/EXTERNAL INTERRUPT CIRCUIT
MB90560 series
MOV
MOV
MOV
MOV
BAPL,#00H
BAPM,#06H
BAPH,#00H
ISCS,#12H
; Sets the address of the output data
;
;
; Byte transfer. I/O address fixed. Buffer address
+ 1. Transfer from memory to I/O
; Specifies port 0 (PDR0) as the transfer destination
; address pointer.
; Number of transfers: 10
;
; Disables INT0 using ENIR.
I:ELVR,#00000001B ; Selects H level for INT0.
I:ER0
; Clears the cause of INT0 using EIRR.
I:EN0
; Enables INT0 using ENIR.
ILM,#07H
; Sets ILM in PS to level 7.
CCR,#40H
; Enables interrupts.
A,#00H
; Endless loop
A,#01H
;
LOOP
;
;-------Interrupt program-------------------------------------------------------------------------------------------------
WARI:
CLRB
I:ER0
; Clears the interrupt request flag.
;
:
;
; Switches the channel and changes the transfer
address, if required.
;
User processing
; Specifies processing again, such as the termination
of EI
2
OS. To terminate the processing, interrupts
must be disabled.
;
:
RETI
; Returns from the interrupt.
CODE
ENDS
;-------Vector setting------------------------------------------------------------------------------------------------------
VECT
CSEG
ABS=0FFH
ORG
0FF98H
; Sets vector for interrupt #11 (0B
H
).
DSL
WARI
ORG
0FFDCH
; Sets reset vector.
DSL
START
DB
00H
; Sets single-chip mode.
VECT
ENDS
END
START
MOV
MOV
MOV
MOV
CLRB
MOV
CLRB
SETB
MOV
OR
MOV
MOV
BRA
IOAL,#00H
IOAH,#00H
DCTL,#0AH
DCTH,#00H
I:EN0
LOOP: