| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
On-Line Manuals C166 User's Guide | Sections, Classes, and GroupsA section is a contiguous area of memory generated from code or data defined in a source module. Each section has a type, class, group, and a name. Sections are usually related to the hardware configuration. Therefore, portions of programs stored in ROM are in separate sections from the portions stored in RAM. Sections generated by the Keil C166 Compiler are given names which are composed of a prefix and the name of the source module. A class is an arbitrarily ordered collection of sections that share a common attribute. The purpose of a class is to allow manipulation of a number of sections using only the class name. For instance, the near data objects from all modules in a program are combined into the NDATA class while the far constant objects are combined into the FCONST class. A group is a shorthand which is used to reference a collection of sections that all reside within one data page (for data groups) or segment (for code groups). Groups define address-range limits for their references sections. Two group types are supported: CGROUP (code groups) and DGROUP (data groups). Groups are used by the linker to guarantee that classes within the group fit into the appropriate address range (16K for DATA or 64K for CODE) and that DPP register assignments are correctly performed in the startup code. The DPPUSE linker directive may be used to extend the address space possible for DATA groups. Objects that the C166 Compiler generates (such as program code, program data, and constant data) are stored in sections that may be absolute or relocatable. The only exception is automatic variables that are stored on the USER STACK that is addressed by the R0 register. The compiler creates a separate section for each memory type used in the C source. Section names created by the C166 Compiler are converted to and stored in uppercase and include a class-code and a module-name formatted as follows: ?class-code?module-name Where
The following table shows all possible section names with their associated class and group names. The class and group names are used by the linker to simplify address assignments and to ensure that objects from different modules are placed in valid address ranges.
Note
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||