SN8P1700
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 183
Revision 1.93
;-------------------------------------------------------------------------------
; ClrRAM
; Use index @YZ to clear RAM (00h~7Fh)
;-------------------------------------------------------------------------------
ClrRAM:
; RAM Bank 0
clr
Y
;Select
bank
0
b0mov
Z,#0x7f
;Set
@YZ
address
from
7fh
ClrRAM10:
clr
@YZ
;Clear
@YZ
content
decms
Z
;z = z – 1 , skip next if z=0
jmp
ClrRAM10
clr
@YZ
;Clear
address
0x00
; RAM Bank 1
mov
A,#1
b0mov
Y,A
;Select
bank
1
b0mov
Z,#0x7f
;Set
@YZ
address
from
17fh
ClrRAM20:
clr
@YZ
;Clear
@YZ
content
decms
Z
;z = z – 1 , skip next if z=0
jmp
ClrRAM20
clr
@YZ
;Clear
address
0x100
ret
;-------------------------------------------------------------------------------
ENDP