SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 26 Version 1.5
2.2.5 Y, Z REGISTERS
The Y and Z registers are the 8-bit buffers. There are three major functions of these registers.
Can be used as general working registers
Can be used as RAM data pointers with @YZ register
Can be used as ROM data pointer with the MOVC instruction for look-up table
Example: Uses Y, Z register as the data pointer to access data in the RAM address 025H of bank0.
; To set RAM bank 0 for Y register
; To set location 25H for Z register
; To read a data into ACC
Example: Uses the Y, Z register as data pointer to clear the RAM data.
; Z = 7FH, the last address of the data memory area
; Z – 1, if Z= 0, finish the routine
; End of clear general purpose data memory area of bank 0
2.2.6 R REGISTER
R register is an 8-bit buffer. There are two major functions of the register.
Can be used as working register
For store high-byte data of look-up table
(MOVC instruction executed, the high-byte data of specified ROM address will be stored in R register and the
low-byte data will be stored in ACC).
Note: Please refer to the “LOOK-UP TABLE DESCRIPTION” about R register look-up table application.