E0C6001 TECHNICAL SOFTWARE
II-48
Interruption vector routine
Label
Mnemonic/operand
Comment
ORG
100H
JP
INIT
JP
INTR
;
Timer interrupt is generated
JP
INTR
JP
INTR
JP
INTR
;
K00 to K03 interrupt is generated
JP
INTR
;
Timer interrupt, K00 to K03 interrupt
;
are generated
;
INTR:
LD
X,0EFH
;
Address of timer interrupt factor flag
LD
Y,TMFSK
;
Address of timer interrupt factor flag buffer
LD
MY,MX
FAN
MY,0100B ;
Check 2 Hz timer interrupt
JP
Z,TI8RQ
;
Jump if not 2 Hz timer interrupt
CALL
TINT2
;
Call 2 Hz timer interrupt service routine
TI8RQ:
LD
Y,TMFSK
;
Address of timer factor flag buffer
FAN
MY,0010B ;
Check 8 Hz timer interrupt
JP
Z,TI32RQ ;
Jump if not 8 Hz timer interrupt
CALL
TINT8
;
Call 8 Hz timer interrupt service routine
• Restart from halt state by interrupt
Main routine
Label
Mnemonic/operand
Comment
LD
X,0E8H
;
Set address of K00 to K03
;
interrupt mask register
OR
MX,1111B
;
Enable K00 to K03
;
input interrupt
;
LD
X,0EBH
;
Set address of timer interrupt
;
mask register
OR
MX,0111B
;
Enable timer interrupt
;
(32 Hz, 8 Hz, 2 Hz)
MAIN:
EI
;
Set interrupt flag (EI state is set)
HALT
;
Halt mode
JP
MAIN
;
Jump to MAIN
Examples of interrupt
and halt control
program
Содержание E0C6001
Страница 4: ...Hardware E0C6001 I Technical Hardware ...
Страница 79: ...Software E0C6001 II Technical Software ...