Motorola HC12 User Manual

Page of 328
User’s Manual
MCUez HC12 Assembler
108
Sections
MOTOROLA
Sections
6.3  Section Attributes
According to content, an attribute is associated with each section. A section may
be a:
Code section
Constant data section
Data section
6.3.1  Code Sections
A section containing at least an instruction is considered to be a code section.
Code sections are always allocated in the target processor ROM area. Code
sections should not contain any variable definitions (variables defined using the
DS (define space) directive). There is no write access on variables defined in a
code section. Additionally, these variables cannot be displayed in the debugger
as data.
Definitions are possible with self-modifiable code. The restriction using this
process is that labels appearing in front of the DS directive will not appear in
the data window.
6.3.2  Constant Data Sections
A section containing only constant data definitions (variables defined using the
DC (define constant) or DCB (define constant block) directives) is considered
to be a constant section. Constant sections should be allocated in the target
processor ROM area; otherwise, they cannot be initialized when the application
is loaded.
NOTE:
It is strongly recommended that the user defines separate sections for
definitions of variables and constant variables. This will avoid any problems in
the initialization of constant variables.