
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.
Содержание PD750004
Страница 8: ... MEMO ...
Страница 20: ... xii MEMO ...
Страница 234: ...214 µPD750008 USER S MANUAL MEMO ...
Страница 244: ...224 µPD750008 USER S MANUAL MEMO ...
Страница 248: ...228 µPD750008 USER S MANUAL MEMO ...
Страница 254: ...234 µPD75008 USER S MANUAL MEMO ...
Страница 328: ...308 µPD750008 USER S MANUAL MEMO ...
Страница 330: ...310 µPD750008 USER S MANUAL MEMO ...
Страница 342: ...322 µPD750008 USER S MANUAL MEMO ...