Location of CON,VAR, OBJ
bdickens
Posts: 110
As I write the code, I dutifully put all my CON, VAR, and OBJ statements together. I've noticed in some other folks code that they have CON blocks all through the code. Does it make a difference ?
I've always assumed that the compiler wouldn't want multiple blocks but it seems to be fine. It would make the code more readable if the CON and VAR blocks were close to the routines that really used them the most. But I don't want to sub-optimize memory.
Under what circumstances does it matter ?
Thanks
I've always assumed that the compiler wouldn't want multiple blocks but it seems to be fine. It would make the code more readable if the CON and VAR blocks were close to the routines that really used them the most. But I don't want to sub-optimize memory.
Under what circumstances does it matter ?
Thanks
Comments
You can have multiple CON, VAR, and OBJ sections. The VARs are all grouped together and the variables are sorted by the compiler so that the LONGs come first, then the WORDs, then the BYTEs in order to avoid waste from alignment issues.