II-74
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Input Ports)
(4) Processing after interrupt generated
This program stores the register data when an interrupt is
generated, recovers the register data when the interrupt
processing completes, and returns to the main routine. The
order of priority for the interrupts is set as shown in the
table below, interrupt nesting is disabled, and processing
proceeds in descending order of priority. The interrupt
processing routine is called with CALL instruction and
processed.
Order of Priority
Interrupt Factor
1
Input ports K00–K03
2
Input port K10
ORG
101H
;
;
JP
INIK
;
JP
INIK
;
JP
INIK
;
;
;
YIKB
EQU
● ▲
● ▲
H
;
;
;
INIK:
PUSH
XH
;
PUSH
XL
;
PUSH
YH
;
PUSH
YL
;
PUSH
A
;
PUSH
B
;
PUSH
F
;
;
LD
X,7AH
;
LD
Y,YIKB
;
LD
MY,MX
;
;
Interrupt vector address of K1 interrupt
If the K1 interrupt is generated, go to "INIK"
If the K0 interrupt is generated, go to "INIK"
If the K0 and K1 interrupts are generated, go to "INIK"
Buffer address of input interrupt factor flags
Store the value of X register in stack
Store the value of Y register in stack
Store the value of A register in stack
Store the value of B register in stack
Store the value of the flag group in stack
(Reset) the input interrupt factor flags
and store in buffer
Table 5.7.4
Order of interrupt priority in
program example
Program
Specifications
Содержание S1C6S3N2
Страница 4: ......
Страница 6: ......
Страница 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Страница 8: ......
Страница 141: ...Software Software S1C6S3N2 II Technical Software ...
Страница 142: ......
Страница 146: ......