Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 Manual De Usuario
Los códigos de productos
SW006021-1
Macro Assembler
2012 Microchip Technology Inc.
DS52053B-page 265
6.4.9.21
SIGNAT
This directive is used to associate a 16-bit signature value with a label. At link time the
linker checks that all signatures defined for a particular label are the same and pro-
duces an error if they are not. The SIGNAT directive is used by MPLAB XC8 to enforce
link time checking of C function prototypes and calling conventions.
linker checks that all signatures defined for a particular label are the same and pro-
duces an error if they are not. The SIGNAT directive is used by MPLAB XC8 to enforce
link time checking of C function prototypes and calling conventions.
Use the SIGNAT directive if you want to write assembly language routines which are
called from C. For example:
called from C. For example:
SIGNAT _fred,8192
will associate the signature value 8192 with the symbol _fred. If a different signature
value for _fred is present in any object file, the linker will report an error.
value for _fred is present in any object file, the linker will report an error.
The easiest way to determine the correct signature value for a routine is to write a C
routine with the same prototype as the assembly routine and check the signature value
determined by the code generator. This will be shown in the assembly list file, see
Section 4.8.16 “--ADDRQUAL: Set Compiler Response to Memory Qualifiers”
and Section 6.5 “Assembly-Level Optimizations”.
routine with the same prototype as the assembly routine and check the signature value
determined by the code generator. This will be shown in the assembly list file, see
Section 4.8.16 “--ADDRQUAL: Set Compiler Response to Memory Qualifiers”
and Section 6.5 “Assembly-Level Optimizations”.
6.4.10
Assembler Controls
Assembler controls may be included in the assembler source to control assembler
operation. These keywords have no significance anywhere else in the program. The
control is invoked by the directive OPT followed by the control name. Some keywords
are followed by one or more arguments. For example:
operation. These keywords have no significance anywhere else in the program. The
control is invoked by the directive OPT followed by the control name. Some keywords
are followed by one or more arguments. For example:
OPT EXPAND
A list of keywords is given in Table 6-7, and each is described further below.
Note 1:
The default options are listed with an asterisk (*)
TABLE 6-7:
ASPIC[18] ASSEMBLER CONTROLS
Control
Meaning
Format
ASMOPT_ON,
ASMOPT_OFF
Start and stop assembly optimiza-
tions
tions
OPT ASMOPT_OFF
;protected code
OPT ASMOPT_ON
COND*,
NOCOND
Include/do not include conditional
code in the listing
code in the listing
OPT COND
EXPAND,
NOEXPAND
Expand/do not expand macros in
the listing output
the listing output
OPT EXPAND
INCLUDE
Textually include another source
file
file
OPT INCLUDE < pathname >
LIST*,
NOLIST
Define options for listing output/dis-
able listing output
able listing output
OPT LIST [< listopt >, ..., <
listopt
>]
PAGE
Start a new page in the listing
output
output
OPT PAGE
SPACE
Add blank lines to listing
OPT SPACE 3
SUBTITLE
Specify the subtitle of the program
OPT SUBTITLE
“< subtitle >”
TITLE
Specify the title of the program
OPT TITLE
“< title >”