SN8P2714X_2715
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 103
V1.4
13
CODING ISSUE
13.1 TEMPLATE CODE
;*******************************************************************************
; FILENAME
: TEMPLATE.ASM
; AUTHOR : SONiX
; PURPOSE
: Template Code for SN8P2710
; REVISION
: V1.0
First issue
;*******************************************************************************
;* (c) Copyright 2004, SONiX TECHNOLOGY CO., LTD.
;*******************************************************************************
CHIP SN8P2715 ;
Select
the
CHIP
;-------------------------------------------------------------------------------
; Include
Files
;-------------------------------------------------------------------------------
.nolist ;
do
not
list
the
macro
file
INCLUDESTD
MACRO1.H
INCLUDESTD
MACRO2.H
INCLUDESTD
MACRO3.H
.list
;
Enable
the
listing
function
;-------------------------------------------------------------------------------
; Constants
Definition
;-------------------------------------------------------------------------------
; ONE
EQU
1
;-------------------------------------------------------------------------------
; Variables
Definition
;-------------------------------------------------------------------------------
.DATA
org
0h
;Bank 0 data section start from RAM address 0x000
Wk00B0
DS
1 ;Temporary
buffer
for
main
loop
Iwk00B0
DS
1 ;Temporary
buffer
for
ISR
AccBuf
DS
1 ;Accumulater
buffer
PflagBuf
DS
1 ;PFLAG
buffer
org
100h
;Bank 1 data section start from RAM address 0x100
BufB1 DS
20
;Temporary
buffer
in
bank
1
;-------------------------------------------------------------------------------
; Bit
Flag
Definition
;-------------------------------------------------------------------------------
Wk00B0_0 EQU
Wk00B0.0 ;Bit 0 of Wk00B0
Iwk00B0_1
EQU
Iwk00B0.1 ;Bit 1 of Iwk00
;-------------------------------------------------------------------------------
; Code
section
;-------------------------------------------------------------------------------
.CODE
ORG
0 ;Code
section
start
jmp
Reset ;Reset
vector