SN8P2714X_2715
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 105
V1.4
; 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
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
;-----------------------------------
; Exit interrupt service routine
;-----------------------------------
IsrExit:
B0MOV
A,
PFLAGBUF
;
B0MOV
PFLAG,
A
b0xch A,AccBuf
;B0xch
instruction do not change C,Z flag
reti
;Exit
the
interrupt
routine
;-------------------------------------------------------------------------------
;
INT0 interrupt service routine
;-------------------------------------------------------------------------------
P00isr:
b0bclr
FP00IRQ