⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmix-symbols.html

📁 gcc手册
💻 HTML
字号:
<html lang="en">

<head>

<title>Using as</title>

<meta http-equiv="Content-Type" content="text/html">

<meta name="description" content="Using as">

<meta name="generator" content="makeinfo 4.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

</head>

<body>

<div class="node">

<p>

Node:<a name="MMIX-Symbols">MMIX-Symbols</a>,

Next:<a rel="next" accesskey="n" href="MMIX-Regs.html#MMIX-Regs">MMIX-Regs</a>,

Previous:<a rel="previous" accesskey="p" href="MMIX-Chars.html#MMIX-Chars">MMIX-Chars</a>,

Up:<a rel="up" accesskey="u" href="MMIX-Syntax.html#MMIX-Syntax">MMIX-Syntax</a>

<hr><br>

</div>



<h5 class="subsection">Symbols</h5>



   <p>The character <code>:</code> is permitted in identifiers.  There are two

exceptions to it being treated as any other symbol character: if a symbol

begins with <code>:</code>, it means that the symbol is in the global namespace

and that the current prefix should not be prepended to that symbol

(see <a href="MMIX-prefix.html#MMIX-prefix">MMIX-prefix</a>).  The <code>:</code> is then not considered part of the

symbol.  For a symbol in the label position (first on a line), a <code>:</code>

at the end of a symbol is silently stripped off.  A label is permitted,

but not required, to be followed by a <code>:</code>, as with many other

assembly formats.



   <p>The character <code>@</code> in an expression, is a synonym for <code>.</code>, the

current location.



   <p>In addition to the common forward and backward local symbol formats

(see <a href="Symbol-Names.html#Symbol%20Names">Symbol Names</a>), they can be specified with upper-case <code>B</code> and

<code>F</code>, as in <code>8B</code> and <code>9F</code>.  A local label defined for the

current position is written with a <code>H</code> appended to the number:

<pre class="smallexample">     3H LDB $0,$1,2

     </pre>

   This and traditional local-label formats cannot be mixed: a label must be

defined and referred to using the same format.



   <p>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

<code>\003</code> (control-C) and <code>\004</code> (control-D) are used for the

MMIX-specific local-symbol syntax.



   <p>The symbol <code>Main</code> is handled specially; it is always global.



   <p>By defining the symbols <code>__.MMIX.start..text</code> and

<code>__.MMIX.start..data</code>, the address of respectively the <code>.text</code>

and <code>.data</code> 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.  See <a href="MMIX-loc.html#MMIX-loc">MMIX-loc</a>.



   </body></html>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -