LX51 User's Guide

Using Wildcards

The LX51 Linker allows you to specify wildcards when specifying segment names in the SEGMENTS directive. An obvious benefit of wildcards is the ability to locate all segments from a single source module without specifying every individual segment name.

LX51 myfile.obj SEGMENTS (?PR?*?myfile (C:0x1000))

There are numerous special-purpose applications where locating segments with wildcards is desirable.  For example, you may use wildcards to locate groups of segments into a 2 KByte block. Then, you may use ACALL and AJMP instructions (rather than LCALL and LJMP) for function calls within this group.

Note

  • The asterisk (*) is the only wildcard allowed and only one wildcard is possible.
  • Wildcards are not allowed with the LAST parameter of the SEGMENTS directive.