Accessing the simulated data EEPROM

The data EEPROM on the PIC is not accessable via the data or program space, it must be accessed via special ports. These are memory mapped registers (mapped into the data space). The data EEPROM behaves as though it is in a seperate self contained address space.

To access data in the simulated data EEPROM use the special register reference [{EEPROM}]. Items in this EEPROM are referenced as offsets from this special register.

	[{EEPROM}][0] referes to location 0 in the data EEPROM address space
	[{EEPROM}][1] referes to location 1 in the data EEPROM address space
	[{EEPROM}][N] referes to location N in the data EEPROM address space

	[{EEPROM}] is equivalent to [{EEPROM}][0]
The following section of embedded simulator code is an example of how data could be loaded into the simulated data EEPROM at program startup
	.open	"datafile", "r"

	.xcsim	for j=0 while j<10 step j=j+1 do
		    .read "datafile", [{EEPROM}][j]
	.xcsim	done

	.close	"datafile"