SCL Reference: accessin() Function
The SCL accessin() function assigns a data file to an SFR.
accessin(filename, // filename (String)
mode, // data format
sfr, // sfr to receive file data
rewind); // true => reuse file data after eof
accessin("C:/MyProj/MyData.dat", hex_mode, RXB0D0, true);
This method injects the data in the file to the SFR. The injections occur "on demand". Specifically the injection occurs each time the processor reads the sfr. For example
movf RXB0D0, W // execution causes injection of next
// file data value to the RXB0D0 register
The filename must have a complete absolute pathname. We expect to have this fixed in a future release.
The mode specifies the format of the data in the file. It can be one of the following values:
binary_mode // non text numeric data (64 bits per word)
dec_mode // text dec: 13 156
formatted_mode // text variable format
// #16#0FE3#
// #10#136#
// B"010011"
// O"70534""
// X"3F5"
hex_mode // text hex: 064 FE3
The sfr is just the Special Function Register that will receive the injection values.
rewind determines if register injection will start over from the file beginning once all the file data has been consumed.