Chapter 30. MMIX Dependent Features
175
30.3.2. Symbols
The character
:
is permitted in identifiers. There are two exceptions to it being treated as any other
symbol character: if a symbol begins with
:
, it means that the symbol is in the global namespace and
that the current prefix should not be prepended to that symbol. The
:
is then not considered part of
the symbol. For a symbol in the label position (first on a line), a
:
at the end of a symbol is silently
stripped off. A label is permitted, but not required, to be followed by a
:
, as with many other assembly
formats.
The character
@
in an expression, is a synonym for
.
, the current location.
In addition to the common forward and backward local symbol formats (Section 6.3 Symbol Names),
they can be specified with upper case
B
and
F
, as in
8B
and
9F
. A local label defined for the current
position is written with a
H
appended to the number:
3H LDB $0,$1,2
This and traditional local label formats cannot be mixed: a label must be defined and referred to using
the same format.
There's a minor caveat: just as for the ordinary local symbols, the local symbols are translated into
ordinary symbols using control characters are to hide the ordinal number of the symbol. Unfortunately,
these symbols are not translated back in error messages. Thus you may see confusing error messages
when local symbols are used. Control characters
\003
(control C) and
\004
(control D) are used for
the MMIX specific local symbol syntax.
The symbol
Main
is handled specially; it is always global.
By defining the symbols
__.MMIX.start..text
and
__.MMIX.start..data
, the address of re 
spectively the
.text
and
.data
segments of the final program can be defined, though when linking
more than one object file, the code or data in the object file containing the symbol is not guaranteed
to be start at that position; just the final executable.
30.3.3. Register names
Local and global registers are specified as
$0
to
$255
. The recognized special register names are
rJ
,
rA
,
rB
,
rC
,
rD
,
rE
,
rF
,
rG
,
rH
,
rI
,
rK
,
rL
,
rM
,
rN
,
rO
,
rP
,
rQ
,
rR
,
rS
,
rT
,
rU
,
rV
,
rW
,
rX
,
rY
,
rZ
,
rBB
,
rTT
,
rWW
,
rXX
,
rYY
and
rZZ
. A leading
:
is optional for special register names.
Local and global symbols can be equated to register names and used in place of ordinary registers.
Similarly for special registers, local and global symbols can be used. Also, symbols equated from
numbers and constant expressions are allowed in place of a special register, except when either of
the options
 no predefined syms
and
 fixed special register names
are specified. Then
only the special register names above are allowed for the instructions having a special register operand;
GET
and
PUT
.
30.3.4. Assembler Directives
LOC
The
LOC
directive sets the current location to the value of the operand field, which may include
changing sections. If the operand is a constant, the section is set to either
.data
if the value is
0x2000000000000000
or larger, else it is set to
.text
. Within a section, the current location
may only be changed to monotonically higher addresses. A LOC expression must be a previously
defined symbol or a "pure" constant.






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