26
Chapter 4. Syntax
Anything from the line comment character to the next newline is considered a comment and is ignored.
The line comment character is
;
for the AMD 29K family;
;
on the ARC;
@
on the ARM;
;
for the
H8/300 family;
!
for the H8/500 family;
;
for the HPPA;
#
on the i386 and x86 64;
#
on the i960;
;
for the PDP 11;
;
for picoJava;
#
for Motorola PowerPC;
!
for the Renesas / SuperH SH;
!
on
the SPARC;
#
on the ip2k;
#
on the m32r;
|
on the 680x0;
#
on the 68HC11 and 68HC12;
;
on the
M880x0;
#
on the Vax;
!
for the Z8000;
#
on the V850;
#
for Xtensa systems; see Chapter 9 Machine
Dependent Features.
On some machines there are two different line comment characters. One character only begins a
comment if it is the first non whitespace character on a line, while the other always begins a comment.
The V850 assembler also supports a double dash as starting a comment that extends to the end of the
line.
;
To be compatible with past assemblers, lines that begin with
#
have a special interpretation. Following
the
#
should be an absolute expression (Chapter 7 Expressions): the logical line number of the next
line. Then a string (Section 4.6.1.1 Strings) is allowed: if present it is a new logical file name. The rest
of the line, if any, should be whitespace.
If the first non whitespace characters on the line are not numeric, the line is ignored. (Just like a
comment.)
# This is an ordinary comment.
# 42 6 "new_file_name"
# New logical file name
# This is logical line # 36.
This feature is deprecated, and may disappear from future versions of
as
.
4.4. Symbols
A symbol is one or more characters chosen from the set of all letters (both upper and lower case), digits
and the three characters
_.$
. On most machines, you can also use
$
in symbol names; exceptions
are noted in Chapter 9 Machine Dependent Features. No symbol may begin with a digit. Case is
significant. There is no length limit: all characters are significant. Symbols are delimited by characters
not in that set, or by the beginning of a file (since the source program must end with a newline, the
end of a file is not a possible symbol delimiter). Chapter 6 Symbols.
4.5. Statements
A statement ends at a newline character (
\n
) or line separator character. (The line separator is usually
;
, unless this conflicts with the comment character; Chapter 9 Machine Dependent Features.) The
newline or separator character is considered part of the preceding statement. Newlines and separators
within character constants are an exception: they do not end statements.
It is an error to end any statement with end of file: the last character of any input file should be a
newline.
An empty statement is allowed, and may include whitespace. It is ignored.
A statement begins with zero or more labels, optionally followed by a key symbol which determines
what kind of statement it is. The key symbol determines the syntax of the rest of the statement.
If the symbol begins with a dot
.
then the statement is an assembler directive: typically valid for
any computer. If the symbol begins with a letter the statement is an assembly language instruction:
it assembles into a machine language instruction. Different versions of
as
for different computers
recognize different instructions. In fact, the same symbol may represent a different instruction in a
different computer's assembly language.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

canadian web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved