Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
Macro Assembler
 2012 Microchip Technology Inc.
DS52053B-page 257
6.4.9.3.3
Class
The class flag specifies a corresponding linker class name for this psect. A class is a 
range of addresses in which psects may be placed.
Class names are used to allow local psects to be located at link time, since they cannot 
always be referred to by their own name in a -P linker option (as would be the case if 
there are more than one local psect with the same name).
Class names are also useful where psects need only be positioned anywhere within a 
range of addresses rather than at a specific address. The association of a class with a 
psect that you have defined typically means that you do not need to supply a custom 
linker option to place it in memory.
SeSection 7.2.1 “-Aclass =low-high,...” for information on how linker classes are 
defined.
6.4.9.3.4
Delta
The delta flag defines the size of the addressable unit. In other words, the number of 
data bytes which are associated with each address.
With PIC mid-range and baseline devices, the program memory space is word 
addressable, hence psects in this space must use a delta of 2. That is to say, each 
address in program memory requires 2 bytes of data in the HEX file to define their 
contents. Thus addresses in the HEX file will not match addresses in the program 
memory.
The data memory space on these devices is byte addressable, hence psects in this 
space must use a delta of 1. This is the default delta value.
All memory spaces on PIC18 devices are byte addressable, so a delta of 1 (the default) 
should be used for all psects on these devices.
The redefinition of a psect with conflicting delta values can lead to phase errors being 
issued by the assembler.
6.4.9.3.5
Global
A psect defined as global will be combined with other global psects with the same 
name at link time. Psects are grouped from all modules being linked.
Psects are considered global by default, unless the local flag is used.
6.4.9.3.6
Limit
The limit flag specifies a limit on the highest address to which a psect may extend. 
If this limit is exceeded when it is positioned in memory, an error will be generated.
6.4.9.3.7
Local
A psect defined as local will not be combined with other local psects from other 
modules at link time, even if there are others with the same name. Where there are two 
local
 psects in the one module, they reference the same psect. A local psect may 
not have the same name as any global psect, even one in another module.
6.4.9.3.8
Merge
This flag can be assigned 0 or 1, or not specified. When assigned 0, the psect will never 
be merged by the assembly optimizer during optimizations. If assigned the value 1, the 
psect may be merged if other psect attributes allow it and the optimizer can see an 
advantage doing so. If this flag is not specified, then merging will not take place.
Typically, merging is only performed on code-based psects (text psects).