NEC PD750008 User Manual

Page 75

Advertising
background image

5 5

CHAPTER 4 INTERNAL CPU FUNCTIONS

Data memory is undefined when it is reset. For this reason, it is to be initialized to zero (RAM clear) usually

at the start of a program. Remember to perform this initialization. Otherwise, unexpected bugs may occur.

Example The following program clears data at addresses 000H to 1FFH in RAM.

SET1

MBE

SEL

MB0

MOV

XA,#00H

MOV

HL,#04H

RAMC0:

MOV

@HL,A

; Clear 04H to FFH

Note

INCS

L

; L <– L + 1

BR

RAMC0

INCS

H

; H <– H + 1

BR

RAMC0

SEL

MB1

RAMC1:

MOV

@HL,A

; Clear 100H to 1FFH

INCS

L

; L <– L + 1

BR

RAMC1

INCS

H

; H <– H + 1

Note Data memory locations at 000H to 003H are allocated to general registers XA and HL, so these are

not cleared.

Advertising
This manual is related to the following products: