Additional EEPROM facilities

hippy

Technical Support
Staff member
I'm trying to create a 'file system' in the on-chip Data EEPROM ...

- SYMBOL ENTRY_0 = 0
- SYMBOL ENTRY_1 = 1
-
- SYMBOL ENTRY_ADR_0 = $02
- EEPROM $02,("Hello",0)
-
- SYMBOL ENTRY_ADR_1 = $08
- EEPROM $08,("World",0)
-
- EEPROM ENTRY_0,(ENTRY_ADR_0)
- EEPROM ENTRY_1,(ENTRY_ADR_1)

That works fine, but if any data changes, all the EEPROM addresses have to be recalculated by hand.

Would it be possible to create an 'EEPROMLOC' predefined symbol which always gives the address of where the next EEPROM command will be placed, plus an 'EEPROM adr' command which simply sets the next location to use ?

This would make life so much simpler ...

- SYMBOL ENTRY_0 = 0
- SYMBOL ENTRY_1 = 1
-
- EEPROM 2
-
- SYMBOL ENTRY_ADR_0 = EEPROMLOC
- EEPROM ("Hello",0)
-
- SYMBOL ENTRY_ADR_1 = EEPROMLOC
- EEPROM ("World",0)
-
- EEPROM 0
-
- EEPROM (ENTRY_ADR_0)
- EEPROM (ENTRY_ADR_1)
 
Top