Where should the DAT section be?
william chan
Posts: 1,326
Should the DAT section preferably be before the SPIN code or at the end of all the SPIN codes?
I am afraid that if I declare a DAT section with strings above the VAR section like
the variables in the VAR section (that is placed after the DAT section) may no longer be aligned by LONG.
That means that if I do a
it may hit a page boundary and cause problems b'cos the address of the variable mylongnum is no longer aligned by long.
What you guys think?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I am afraid that if I declare a DAT section with strings above the VAR section like
strName BYTE "Hello",0
the variables in the VAR section (that is placed after the DAT section) may no longer be aligned by LONG.
That means that if I do a
eeprom.WriteLong(eeprom#bootpin,eeprom#eeprom, @mylongnum,mylongnum)
it may hit a page boundary and cause problems b'cos the address of the variable mylongnum is no longer aligned by long.
What you guys think?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Comments
You can pretty much put anything anywhere and it will sort it out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Put a "long" in front if you're not sure ...