28
Chapter 4. Syntax
\r
Mnemonic for carriage Return; for ASCII this is octal code 015.
\t
Mnemonic for horizontal Tab; for ASCII this is octal code 011.
\
digit digit digit
An octal character code. The numeric code is 3 octal digits. For compatibility with other Unix
systems, 8 and 9 are accepted as digits: for example,
\008
has the value 010, and
\009
the value
011.
\
x hex digits...
A hex character code. All trailing hex digits are combined. Either upper or lower case
x
works.
\\
Represents one
\
character.
\"
Represents one
"
character. Needed in strings to represent this character, because an unescaped
"
would end the string.
\
anything else
Any other character when escaped by \ gives a warning, but assembles as if the
\
was not present.
The idea is that if you used an escape sequence you clearly didn't want the literal interpretation
of the following character. However
as
has no other interpretation, so
as
knows it is giving you
the wrong code and warns you of the fact.
Which characters are escapable, and what those escapes represent, varies widely among assemblers.
The current set is what we think the BSD 4.2 assembler recognizes, and is a subset of what most C
compilers recognize. If you are in doubt, do not use an escape sequence.
4.6.1.2. Characters
A single character may be written as a single quote immediately followed by that character. The same
escapes apply to characters as to strings. So if you want to write the character backslash, you must
write '\\ where the first
\
escapes the second
\
. As you can see, the quote is an acute accent, not a
grave accent. A newline immediately following an acute accent is taken as a literal character and does
not count as the end of a statement. The value of a character constant in a numeric expression is the
machine's byte wide code for that character.
as
assumes your character code is ASCII: 'A means 65,
'B means 66, and so on.
4.6.2. Number Constants
as
distinguishes three kinds of numbers according to how they are stored in the target machine.
Integers are numbers that would fit into an
int
in the C language. Bignums are integers, but they are
stored in more than 32 bits. Flonums are floating point numbers, described below.
footer
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