STORE and the DATA command
Val
Posts: 4
Hi,
Does anyone know, does the STORE directive apply to the DATA command as it does to READ and WRITE. That is, can I specify slot 1 using the STORE command and then issue a DATA directive to push an array of values there?
My program is nearly at the limit of available space, and I'd like to try and add some static variables to EEPROM in a separate slot and retrieve them when the time comes. I can do this with manual WRITE statements, but the DATA command seemed like it might take up less space.
Thanks,
Val
Does anyone know, does the STORE directive apply to the DATA command as it does to READ and WRITE. That is, can I specify slot 1 using the STORE command and then issue a DATA directive to push an array of values there?
My program is nearly at the limit of available space, and I'd like to try and add some static variables to EEPROM in a separate slot and retrieve them when the time comes. I can do this with manual WRITE statements, but the DATA command seemed like it might take up less space.
Thanks,
Val
Comments
The STORE command applied to the READ and WRITE commands only.
Be careful with this in that it may not do what you want. If the values change often, you may want to use the GET / PUT commands instead which store their data in a small RAM area. The EEPROM has only limited write ability. If you change a location more than 100,000 times, it may "burn out". It's surprisingly easy to reach that number of changes if you're not careful.
' {$STAMP BS2pe, staticVariables.bpe}
' {$PBASIC 2.5}
x VAR Byte
STORE 1 ' point to slot 1
READ 0, x
DEBUG ? x
' and so on
and in staticVariables.bpe
' {$STAMP BS2pe}
' {$PBASIC 2.5}
DATA 77, "hello", 0, "888-888-8888",0
' and so on
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
-Val