What is initialised and unitialised data?

Posted on 2005-01-10 05:43:56 by stevenroyals
initialised data is data which you assigned value to. unitialised data is data that has no data in it when before you use it.
Posted on 2005-01-10 06:08:41 by roticv
Thanks for your help.

.DATA Initialised data is data which you assigned value to.

.CONST This section contains declaration of constants used by your program.

Wouldn't CONST and DATA be the same thing? You put information into the DATA section to be initialised when the program starts. I assume this inormation stays the same ie it is constant. How is the .DATA section different to the .CONST section?

Posted on 2005-01-10 06:52:38 by stevenroyals
Don't bother with .CONST It has no uses in my opinion.
Posted on 2005-01-10 07:40:41 by roticv
No DATA will not stay constant, unless you want it to :P, instead variable from .DATA section will have an initial value (that you must provide in code)

variables in .DATA? section will not have a well known initial value, theoretically it can be anything...
Posted on 2005-01-10 10:30:29 by BogdanOntanu
.CONST section can be made read-only - this will help you trap writes to the section (which is of course an error for CONST data). Can be useful when debugging.
Posted on 2005-01-10 12:12:33 by f0dder