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

製品コード
SW006021-1
ページ / 518
Macro Assembler
 2012 Microchip Technology Inc.
DS52053B-page 249
6.4.2
Statement Formats
Legal statement formats are shown in TablSection Table 6-2: “ASPIC[18] 
Statement Formats”
.
The label field is optional and, if present, should contain one identifier. A label may 
appear on a line of its own, or precede a mnemonic as shown in the second format.
The third format is only legal with certain assembler directives, such as MACRO, SET 
and EQU. The name field is mandatory and should also contain one identifier.
If the assembly file is first processed by the C preprocessor, see Section 4.8.11 “-P: 
Preprocess Assembly Files”
,
 then it may also contain lines that form valid preproces-
sor directives. See Section 5.14.1 “C Language Comments” for more information on 
the format for these directives.
There is no limitation on what column or part of the line in which any part of the 
statement should appear.
6.4.3
Characters
The character set used is standard 7 bit ASCII. Alphabetic case is significant for 
identifiers, but not mnemonics and reserved words. Tabs are treated as equivalent to 
spaces.
6.4.3.1
DELIMITERS
All numbers and identifiers must be delimited by white space, non-alphanumeric 
characters or the end of a line.
6.4.3.2
SPECIAL CHARACTERS
There are a few characters that are special in certain contexts. Within a macro body, 
the character & is used for token concatenation. To use the bitwise & operator within a 
macro body, escape it by using && instead. In a macro argument list, the angle brackets 
<
 and > are used to quote macro arguments.
6.4.4
Comments
An assembly comment is initiated with a semicolon that is not part of a string or 
character constant.
If the assembly file is first processed by the C preprocessor, see Section 4.8.11 “-P: 
Preprocess Assembly Files”
, then the file may also contain C or C++ style comments 
using the standard /* ... */ and // syntax.
TABLE 6-2:
ASPIC[18] STATEMENT FORMATS
Format #
Feild1
Field2
Field3
Field4
Format 1
label:
Format 2
label:
mnemonic
operands
; comment
Format 3
name
pseudo-op
operands
; comment
Format 4
; comment only  
 
Format 5
empty line