Modified previous post.
Not confuse CODE_SEG with CONST_SEG.
Nothing like a good user manual.
"Manual_Compiler_HC08.pdf" pages 301-304
#pragma CONST_SEG: Constant Data
Segment Definition
Scope: Next pragma CONST_SEG
Syntax: "#pragma CONST_SEG” (<Modif> <Name> | “DEFAULT”)
Synonym: CONST_SECTION
Arguments: <Modif>: Some of the following strings may be used: SHORT, __SHORT_SEG, DIRECT,__DIRECT_SEG, NEAR, __NEAR_SEG, CODE, __CODE_SEG, FAR, __FAR_SEG,
Each modifier has a synonym in the form of “__<modifier>_ SEG”. This reduces clashes with other possible defines in header files, e.g. if NEAR is undefined in another portion of your code.
The segment modifiers are backend-dependent. Refer to the backend chapter to find the supported modifiers and their meaning.
The SHORT modifier specifies a segment which is accessed with - bit addresses.
<Name>: The name of the segment. This name must be used in the link parameter file on the left side of the assignment in the PLACEMENT part. Please refer to the linker manual for details.
Default: DEFAULT
Description: This pragma allocates constant variables into a segment. The segment is then located in the link parameter file to specific addresses.
The pragma CONST_SEG sets the current const segment. This segment is places all constant variable declarations. The default segment is set with:
#pragma CONST_SEG DEFAULT”