Specifies the addressing mode and location of object code for variable data.
#pragma DATA_SEG [ modifier ] [ name ]
#pragma DATA_SEG DEFAULT
modifier
This optional parameter specifies the addressing mode to use:
name
A section name. You must use a section name defined in your project's linker command file.
To specify the section in which to store variable data and the addressing mode to refer to this data, place this pragma before variable definitions. Use this pragma when porting source code for HC08 architectures to ColdFire V1 architectures.
Use DEFAULT to use the parameters specified in the previous use of this pragma.
The following listing shows an example.
/* Place socks in section sdata. */ struct { int left; int right; } socks = { 1, 2 }; /* Place socks_total in section sbss. int socks_total; /* Place socks_flag in section MYDATA. #pragma DATA_SEG MYDATA int socks_flag;