Chapter 4. Syntax
27
A label is a symbol immediately followed by a colon (
:
). Whitespace before a label or after a colon
is permitted, but you may not have whitespace between a label's symbol and its colon. Section 6.1
Labels.
For HPPA targets, labels need not be immediately followed by a colon, but the definition of a label
must begin in column zero. This also implies that only one label may be defined on each line.
label:
.directive
followed by something
another_label:
# This is an empty statement.
instruction
operand_1, operand_2, ...
4.6. Constants
A constant is a number, written so that its value is known by inspection, without knowing any context.
Like this:
.byte
74, 0112, 092, 0x4A, 0X4a, 'J, '\J # All the same value.
.ascii "Ring the bell\7"
# A string constant.
.octa
0x123456789abcdef0123456789ABCDEF0 # A bignum.
.float 0f 314159265358979323846264338327\
95028841971.693993751E 40
# pi, a flonum.
4.6.1. Character Constants
There are two kinds of character constants. A character stands for one character in one byte and
its value may be used in numeric expressions. String constants (properly called string literals) are
potentially many bytes and their values may not be used in arithmetic expressions.
4.6.1.1. Strings
A string is written between double quotes. It may contain double quotes or null characters. The way
to get special characters into a string is to escape these characters: precede them with a backslash
\
character. For example
\\
represents one backslash: the first
\
is an escape which tells
as
to interpret
the second character literally as a backslash (which prevents
as
from recognizing the second
\
as an
escape character). The complete list of escapes follows.
\b
Mnemonic for backspace; for ASCII this is octal code 010.
\f
Mnemonic for FormFeed; for ASCII this is octal code 014.
\n
Mnemonic for newline; for ASCII this is octal code 012.
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