SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 181
Revision 1.93
JmpSub0:
; Subroutine 1
jmp
JmpExit
JmpSub1:
; Subroutine 2
jmp
JmpExit
JmpSub2:
; Subroutine 3
jmp
JmpExit
JmpExit:
ret
;Return
Main
;-------------------------------------------------------------------------------
; Isr (Interrupt Service Routine)
; Arguments :
; Returns
:
; Reg Change:
;-------------------------------------------------------------------------------
Isr:
;-----------------------------------
;
Save ACC and system registers
;-----------------------------------
b0xch
A,AccBuf
;B0xch instruction do not change C,Z flag
push ;Remark
this
line
in
SN8P1702
registers
;Save
80h
~
87h
system
;Following two lines for SN8X1702 only
;b0mov
A,PFLAG
;b0mov
PflagBuf,A
;-----------------------------------
; Check which interrupt happen
;-----------------------------------
IntP00Chk:
b0bts1
FP00IEN
jmp
IntTc0Chk
;Modify this line for another interrupt
b0bts0 FP00IRQ
jmp P00isr
;If necessary, insert another interrupt checking here
IntTc0Chk:
b0bts1
FTC0IEN
jmp
IsrExit
;Suppose TC0 is the last interrupt which you
b0bts0
FTC0IRQ
;want
to
check
jmp
TC0isr