$IDLOCS - Define user ID bytes

Language reference ›› Directives ››
Parent Previous Next

idlocs-directive = $IDLOCS [BYTE] ( idlocs-string | idlocs-items ) .
idlocs-items = idlocs-item { "," idlocs-item } .
idlocs-item = idlocs-index ":" idlocs-value .

Defines the processor's IDLOCS bits (user ID locations).

It is not allowed in units.
It may be used several times, but cannot be used after code generation has started.
The optional BYTE tag forces the compiler to generate a byte for each item, for processors where ID locations may be byte wide.


May be a single quoted string, limited in size to the max number of user IDs of the processor (typically 4); this syntax is maintained for compatibility with MPASM old syntax format.

Special behavior: if the user ID locations limits for the current processor is 0..15, then each digit is interpreted as hexadecimal digits and translated as 0..9, A..F (0..15).


Is an integer expression that returns a constant in the 0..n range, where n depends on the number of user IDs of the processor.


Is an integer expression that returns a constant compatible with the user IDs format of the processor. For most 12-bit core it is a 4-bit value (0..15), for most 14-bit core it is a 7-bit value (0..127) and for 16-bit core it is a 8-bit value (0..255).

{$IDLOCS 0:1, 1:$FF, 2:$AA, 3:MY_IDLOC_3 }
{$IDLOCS '1234'}