SN8P2714X_2715
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 104
V1.4
;Address
4
to
7
are
reserved
ORG
8
jmp
Isr
;Interrupt
vector
ORG
10h
;-------------------------------------------------------------------------------
;
Program reset section
;-------------------------------------------------------------------------------
Reset:
mov
A,#07Fh
;Initial stack pointer and
b0mov
STKP,A
;disable global interrupt
clr
PFLAG
;pflag
=
x,x,x,x,x,c,dc,z
mov
A,#00h
;Initial system mode
b0mov
OSCM,A
mov
A,
#0x5A
b0mov
WDTR,
A
;Clear
watchdog
timer
call
ClrRAM
;Clear RAM
call
SysInit
;System initial
b0bset
FGIE
;Enable global interrupt
;-------------------------------------------------------------------------------
; Main
routine
;-------------------------------------------------------------------------------
Main:
mov
A,
#0x5A
;Clear
watchdog
timer
b0mov
WDTR,
A
call
MnApp
jmp
Main
;-------------------------------------------------------------------------------
; Main
application
;-------------------------------------------------------------------------------
MnApp:
; Put your main program here
ret
;-----------------------------------
;
Jump table routine
;-----------------------------------
ORG
0x0100
;The jump table should start from the head
;of
boundary.
b0mov
A,Wk00B0
and
A,#3
ADD PCL,A
jmp JmpSub0
jmp JmpSub1
jmp JmpSub2
;-----------------------------------
JmpSub0:
; Subroutine 1
jmp
JmpExit
JmpSub1: