6.1.9.44 Signat Directive

The SIGNAT 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. The linker will produce an error if they are not. The SIGNAT directive is used to enforce link time checking of function prototypes and calling conventions.

For example:

SIGNAT _fred,8192

associates 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.

Often, this directive is used with assembly language routines that are called from C. The easiest way to determine the signature value used by the MPLAB XC8 C Compiler is to write a C routine with the same prototype as that required for the assembly routine, and check that function's signature directive argument, as determined by the code generator and as shown in the assembly list file.