Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

182 lines
8.1KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Z80 Directives (Using as)</title>
  16. <meta name="description" content="Z80 Directives (Using as)">
  17. <meta name="keywords" content="Z80 Directives (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="Z80_002dDependent.html#Z80_002dDependent" rel="up" title="Z80-Dependent">
  25. <link href="Z80-Opcodes.html#Z80-Opcodes" rel="next" title="Z80 Opcodes">
  26. <link href="Z80-Floating-Point.html#Z80-Floating-Point" rel="prev" title="Z80 Floating Point">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Z80-Directives"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="Z80-Opcodes.html#Z80-Opcodes" accesskey="n" rel="next">Z80 Opcodes</a>, Previous: <a href="Z80-Floating-Point.html#Z80-Floating-Point" accesskey="p" rel="prev">Z80 Floating Point</a>, Up: <a href="Z80_002dDependent.html#Z80_002dDependent" accesskey="u" rel="up">Z80-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="Z80-Assembler-Directives"></a>
  63. <h4 class="subsection">9.56.4 Z80 Assembler Directives</h4>
  64. <a name="index-Z80_002donly-directives"></a>
  65. <p><code>as</code> for the Z80 supports some additional directives for
  66. compatibility with other assemblers.
  67. </p>
  68. <p>These are the additional directives in <code>as</code> for the Z80:
  69. </p>
  70. <dl compact="compact">
  71. <dt><code><code>.assume ADL = <var>expression</var></code></code></dt>
  72. <dd><a name="index-_002eassume-directive_002c-Z80"></a>
  73. <p>Set ADL status for eZ80. Non-zero value enable compilation in ADL mode else
  74. used Z80 mode. ADL and Z80 mode produces incompatible object code. Mixing
  75. both of them within one binary may lead problems with disassembler.
  76. </p>
  77. </dd>
  78. <dt><code><code>db <var>expression</var>|<var>string</var>[,<var>expression</var>|<var>string</var>...]</code></code></dt>
  79. <dd><a name="index-db-directive_002c-Z80"></a>
  80. </dd>
  81. <dt><code><code>defb <var>expression</var>|<var>string</var>[,<var>expression</var>|<var>string</var>...]</code></code></dt>
  82. <dd><a name="index-defb-directive_002c-Z80"></a>
  83. </dd>
  84. <dt><code><code>defm <var>string</var>[,<var>string</var>...]</code></code></dt>
  85. <dd><a name="index-defm-directive_002c-Z80"></a>
  86. <p>For each <var>string</var> the characters are copied to the object file, for
  87. each other <var>expression</var> the value is stored in one byte.
  88. A warning is issued in case of an overflow.
  89. Backslash symbol in the strings is generic symbol, it cannot be used as
  90. escape character. See <a href="Ascii.html#Ascii"><code>.ascii</code></a>.
  91. </p>
  92. </dd>
  93. <dt><code><code>dw <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  94. <dd><a name="index-dw-directive_002c-Z80"></a>
  95. </dd>
  96. <dt><code><code>defw <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  97. <dd><a name="index-defw-directive_002c-Z80"></a>
  98. <p>For each <var>expression</var> the value is stored in two bytes, ignoring
  99. overflow.
  100. </p>
  101. </dd>
  102. <dt><code><code>d24 <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  103. <dd><a name="index-d24-directive_002c-Z80"></a>
  104. </dd>
  105. <dt><code><code>def24 <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  106. <dd><a name="index-def24-directive_002c-Z80"></a>
  107. <p>For each <var>expression</var> the value is stored in three bytes, ignoring
  108. overflow.
  109. </p>
  110. </dd>
  111. <dt><code><code>d32 <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  112. <dd><a name="index-d32-directive_002c-Z80"></a>
  113. </dd>
  114. <dt><code><code>def32 <var>expression</var>[,<var>expression</var>...]</code></code></dt>
  115. <dd><a name="index-def32-directive_002c-Z80"></a>
  116. <p>For each <var>expression</var> the value is stored in four bytes, ignoring
  117. overflow.
  118. </p>
  119. </dd>
  120. <dt><code><code>ds <var>count</var>[, <var>value</var>]</code></code></dt>
  121. <dd><a name="index-ds-directive_002c-Z80"></a>
  122. </dd>
  123. <dt><code><code>defs <var>count</var>[, <var>value</var>]</code></code></dt>
  124. <dd><a name="index-defs-directive_002c-Z80"></a>
  125. <p>Fill <var>count</var> bytes in the object file with <var>value</var>, if
  126. <var>value</var> is omitted it defaults to zero.
  127. </p>
  128. </dd>
  129. <dt><code><code><var>symbol</var> defl <var>expression</var></code></code></dt>
  130. <dd><a name="index-defl-directive_002c-Z80"></a>
  131. <p>The <code>defl</code> directive is like <code>.set</code> but with different
  132. syntax. See <a href="Set.html#Set"><code>.set</code></a>.
  133. It set the value of <var>symbol</var> to <var>expression</var>. Symbols defined
  134. with <code>defl</code> are not protected from redefinition.
  135. </p>
  136. </dd>
  137. <dt><code><code><var>symbol</var> equ <var>expression</var></code></code></dt>
  138. <dd><a name="index-equ-directive_002c-Z80"></a>
  139. <p>The <code>equ</code> directive is like <code>.equiv</code> but with different
  140. syntax. See <a href="Equiv.html#Equiv"><code>.equiv</code></a>.
  141. It set the value of <var>symbol</var> to <var>expression</var>. It is an error
  142. if <var>symbol</var> is already defined. Symbols defined with <code>equ</code>
  143. are not protected from redefinition.
  144. </p>
  145. </dd>
  146. <dt><code><code>psect <var>name</var></code></code></dt>
  147. <dd><a name="index-psect-directive_002c-Z80"></a>
  148. <p>A synonym for <code>.section</code>, no second argument should be given.
  149. See <a href="Section.html#Section"><code>.section</code></a>.
  150. </p>
  151. </dd>
  152. <dt><code><code>xdef <var>symbol</var></code></code></dt>
  153. <dd><a name="index-xdef-directive_002c-Z80"></a>
  154. <p>A synonym for <code>.global</code>, make <var>symbol</var> is visible to linker.
  155. See <a href="Global.html#Global"><code>.global</code></a>.
  156. </p>
  157. </dd>
  158. <dt><code><code>xref <var>name</var></code></code></dt>
  159. <dd><a name="index-xref-directive_002c-Z80"></a>
  160. <p>A synonym for <code>.extern</code> (<a href="Extern.html#Extern"><code>.extern</code></a>).
  161. </p>
  162. </dd>
  163. </dl>
  164. <hr>
  165. <div class="header">
  166. <p>
  167. Next: <a href="Z80-Opcodes.html#Z80-Opcodes" accesskey="n" rel="next">Z80 Opcodes</a>, Previous: <a href="Z80-Floating-Point.html#Z80-Floating-Point" accesskey="p" rel="prev">Z80 Floating Point</a>, Up: <a href="Z80_002dDependent.html#Z80_002dDependent" accesskey="u" rel="up">Z80-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  168. </div>
  169. </body>
  170. </html>