Nec PD750008 User Manual Page 75

  • Download
  • Add to my manuals
  • Print
  • Page
    / 342
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 74
55
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.
Page view 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 341 342

Comments to this Manuals

No comments