section
Syntax
#pragma section="NAME" [__memoryattribute] alias
#pragma segment="NAME" [__memoryattribute] Parameters
| The name of the section. |
| An optional memory attribute identifying the memory the section will be placed in—if not specified, default memory is used. |
Description
Use this pragma directive to define a section name that can be used by the section operators __section_begin, __section_end, and __section_size. All section declarations for a specific section must have the same memory type attribute and alignment.
The __memoryattribute parameter only relevant when used together with the section operators __section_begin, __section_end, and __section_size.
If an optional memory attribute is used, the return type of the section operators __section_begin and __section_end is:
void __memoryattribute *.Note
To place variables or functions in a specific section, use the #pragma location directive or the @ operator.
Example
#pragma section="MYnear" __near