3 – urom_movedp0dec, 4 – urom_movedp1, 5 – urom_movedp1inc – Maxim Integrated DS4830A Optical Microcontroller User Manual
Page 234: Ds4830a user’s guide
DS4830A User’s Guide
234
25.3.3 – UROM_moveDP0dec
Function
UROM_moveDP0dec
Summary
Reads the byte/word value pointed to by DP[0], then decrements DP[0].
Inputs
DP[0]: Address to read from data space (include 8000h offset if reading from flash).
Outputs
GR: Data byte/word read. DP[0] is decremented.
Destroys
None
Notes:
• Before calling this function, DPC should be set appropriately to configure DP[0] for byte or word mode.
• The address passed to this function should be based on the data memory mapping for the utility ROM, as
shown in Figure 25-1. When a byte mode address is used, CDA0 must be set appropriately to access
either the upper or lower half of program flash memory.
• This function automatically selects DP[0] as the data pointer before reading the byte/word value.
• Implemented as: move GR, @DP[0]--
25.3.4 – UROM_moveDP1
Function
UROM_moveDP1
Summary
Reads the byte/word value pointed to by DP[1].
Inputs
DP[1]: Address to read data space (include 8000h offset if reading from flash).
Outputs
GR: Data byte/word read.
Destroys
None
Notes:
• Before calling this function, DPC should be set appropriately to configure DP[1] for byte or word mode.
• The address passed to this function should be based on the data memory mapping for the utility ROM, as
shown in Figure 25-1. When a byte mode address is used, CDA0 must be set appropriately to access
either the upper or lower half of program flash memory.
• This function automatically selects DP[1] as the data pointer before reading the byte/word value.
• Implemented as: move GR, @DP[1]
25.3.5 – UROM_moveDP1inc
Function
UROM_moveDP1inc
Summary
Reads the byte/word value pointed to by DP[1], then increments DP[1].
Inputs
DP[1]: Address to read from data space (include 8000h offset if reading from flash).
Outputs
GR: Data byte/word read. DP[1] is incremented.
Destroys
None
Notes:
• Before calling this function, DPC should be set appropriately to configure DP[1] for byte or word mode.
• The address passed to this function should be based on the data memory mapping for the utility ROM, as
shown in Figure 25-1. When a byte mode address is used, CDA0 must be set appropriately to access
either the upper or lower half of program flash memory.
• This function automatically selects DP[1] as the data pointer before reading the byte/word value.
• Implemented as: move GR, @DP[1]++