|
SN8P2602B Datasheet, PDF (15/95 Pages) SONiX Technology Company – 8-Bit Micro-Controller | |||
|
◁ |
SN8P2602B
8-Bit Micro-Controller
¾ Example: Defining Interrupt Vector. The interrupt service routine is following user program.
.CODE
START:
MY_IRQ:
ORG
JMP
â¦
ORG
JMP
ORG
â¦
â¦
â¦
JMP
â¦
PUSH
â¦
â¦
POP
RETI
â¦
ENDP
0
START
8
MY_IRQ
10H
START
; 0000H
; Jump to user program address.
; Interrupt vector.
; 0008H, Jump to interrupt service routine address.
; 0010H, The head of user program.
; User program.
; End of user program.
;The head of interrupt service routine.
; Save ACC and PFLAG register to buffers.
; Load ACC and PFLAG register from buffers.
; End of interrupt service routine.
; End of program.
 Note: It is easy to understand the rules of SONIX program from demo programs given above. These
points are as following:
1. The address 0000H is a âJMPâ instruction to make the program starts from the beginning.
2. The address 0008H is interrupt vector.
3. Userâs program is a loop routine for main purpose application.
SONiX TECHNOLOGY CO., LTD
Page 15
Preliminary Version 0.4
|
▷ |