__memoryRestore
Syntax
__memoryRestore(zone, filename, offset)
Parameters
zoneA string that specifies the memory zone, see C-SPY memory zones.
filenameA string that specifies the file to be read. The filename must include a path, which must either be absolute or use argument variables. For information about argument variables, see Argument variables.
offsetAn integer offset. When restoring data from the file into memory, this offset is added to the addresses specified in the file. For example, if the file contains data from
0x0–0x1FFand the offset is0x400, the data will be placed in memory in the range0x400–0x5FF. This makes it possible to restore data into memory on addresses larger than 32-bit, even if the file format only supports 32-bit addresses.
Return value
int 0
For use with
All C-SPY drivers.
Description
Reads the contents of a file and saves it to the specified memory zone.
Example
__memoryRestore("", "c:\\temp\\saved_mem.hex", 0x400);