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

製品コード
SW006021-1
ページ / 518
Utilities
 2012 Microchip Technology Inc.
DS52053B-page 311
8.6.1.17
-STRING
The -STRING option will embed an ASCII string at a fixed address. The usage of this 
option is:
-STRING@Address [tCode]=”Text
where:
• Address is the location to store this string.
• Code is optional and allows a byte sequence to trail each byte in the string. This 
can allow the bytes of the string to be encoded within an instruction.
• Text is the string to convert to ASCII and embed.
For example:
-STRING@1000=”My favorite string”
will store the ASCII data for the string, My favorite string (including the nul 
character terminator) at address 1000h.
And again:
-STRING@1000t34=”My favorite string”
will store the same string with every byte in the string being trailed with the HEX code 
34h
.
8.6.1.18
-STRPACK
This option performs the same function as -STRING but with two important differences. 
Firstly, only the lower seven bits from each character are stored. Pairs of 7 bit charac-
ters are then concatenated and stored as a 14 bit word rather than in separate bytes. 
This is known as string packing. This is usually only useful for devices where program 
space is addressed as 14 bit words (PIC10/12/16 devices). The second difference is 
that -STRING’s t specifier is not applicable with the -STRPACK option.