380
Platforms
©2000-2008 Tibbo Technology Inc.
Value Range:
0-65535
See Also:
Details
0 size is returned when the file does not exist or the file is empty.
The size will be truncated to 65534 even if the actual file is larger. This
is because the romfile.pointer is a variable of word type.
Stor Object
The stor object provides access to the non-volatile (EEPROM) memory in which
your application can store data that must not be lost when the device is switched
off.
read-only property tells you the amount of EEPROM memory
offered by the stor object. The
is used to write the data to the EEPROM,
while the
method is used to read the data from the EEPROM.
Here is a simple example how to save the IP address of your device in the
EEPROM:
dim
s
as
string
dim
x
as
byte
s=ddval(net.ip)
'this way it will take less space in the EEPROM (only 4
bytes needed)
x= stor.set(s,
0
)
'write EEPROM
'check result
if
x<>len(s)
then
'EEPROM write failure- do something about this!
end
if
And here is how you read this data back from the EEPROM:
net.ip=ddstr(stor.get(
0
,
4
))
Notice, that with the stor object addresses are counted from 1, not 0. That is, the
first memory location has address 1.
Special configuration area
The EEPROM IC of the device is also used to store certain configuration information
required by the device (for details see "Platform-dependent Programming
Information" topic inside your platform specifications section). Memory available to
379
383
382
381