SPLat Logo

ShadowRead mm*+,cc

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

ShadowRead mm*+,cc

[mm..(mm+cc-1)] = [shadow_mm..(shadow_mm+cc-1)]

Read from non-volatile shadow memory to RAM. Start at address (location number) mm and read cc bytes. If the shadow memory has not been previously written to, it will contain 0.

Data in the shadow memory is retained even when the power goes off.

Caution: If the start address mm plus the count cc add up to an address beyond the end of RAM, the board will generate a fatal runtime error and reset.

This instruction can be used in indexed mode, i.e. iShadowRead.

+ From dialect 16 the address argument will be jndexed when executed inside a MultiTrack task and will be indexed if the instruction is preceded by the IasJ: precode.

Note that the index or jndex offset is I or J single bytes. This can produce unexpected results if you are reading for example jndexed floating point data.

Shadow memory is not affected by downloading a new program to the controller. That means any user setup parameters (for example) will remain unchanged. That represents both an advantage and a risk. If you change your program or we change the way we allocate RAM (defBYTE etc) you could have problem, because suddenly your parameters are no longer at the expected addresses. You should therefore consider using absolute RAM addresses (mEQU) to allocate RAM to user parameters.

Dialect exclusions: Not available in dialects before 10.

See also ShadowWrite ShadowClear