struct.html

来自「gcc手册」· HTML 代码 · 共 38 行

HTML
38
字号
<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="Struct">Struct</a>,

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

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

Up:<a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo%20Ops">Pseudo Ops</a>

<hr><br>

</div>



<h3 class="section"><code>.struct </code><var>expression</var><code></code></h3>



   <p>Switch to the absolute section, and set the section offset to <var>expression</var>,

which must be an absolute expression.  You might use this as follows:

<pre class="smallexample">             .struct 0

     field1:

             .struct field1 + 4

     field2:

             .struct field2 + 4

     field3:

     </pre>

   This would define the symbol <code>field1</code> to have the value 0, the symbol

<code>field2</code> to have the value 4, and the symbol <code>field3</code> to have the

value 8.  Assembly would be left in the absolute section, and you would need to

use a <code>.section</code> directive of some sort to change to some other section

before further assembly.



   </body></html>



⌨️ 快捷键说明

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