EasyManua.ls Logo

SONIX SN8P2501D - Page 14

Default Icon
96 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 14 Version 1.5
Example: Defining Interrupt Vector. The interrupt service routine is following user program.
.CODE
ORG
0
; 0000H
JMP
START
; Jump to user program address.
ORG
8
; Interrupt vector.
JMP
MY_IRQ
; 0008H, Jump to interrupt service routine address.
ORG
10H
START:
; 0010H, The head of user program.
; User program.
JMP
START
; End of user program.
MY_IRQ:
;The head of interrupt service routine.
PUSH
; Save ACC and PFLAG register to buffers.
POP
; Load ACC and PFLAG register from buffers.
RETI
; End of interrupt service routine.
ENDP
; 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. Users program is a loop routine for main purpose application.

Table of Contents

Related product manuals