CHAPTER 4 INTERNAL CPU FUNCTION
68 Users Manual U10676EJ3V0UM
The contents of the data memory are undefined at reset. Therefore, they must be initialized at the beginning of
program execution (RAM clear). Otherwise, unexpected bugs may occur.
Example To clear RAM at addresses 000H to 07FH
SET1 MBE
SEL MB0
MOV XA, #00H
MOV HL, #04H
RAMC0 : MOV @HL, A ;Clears 004H to 07FHNote
INCS L ;L L+1
BR RAMC0
INCS H ; H H+1
NOP
SKE H, #08H
BR RAMC0
Note Data memory addresses 000H to 003H are not cleared because they are used as general-purpose register
pairs XA and HL.