Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Z80-Opcodes.html 6.0KB

před 3 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 Opcodes (Using as)</title>
  16. <meta name="description" content="Z80 Opcodes (Using as)">
  17. <meta name="keywords" content="Z80 Opcodes (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="Z8000_002dDependent.html#Z8000_002dDependent" rel="next" title="Z8000-Dependent">
  26. <link href="Z80-Directives.html#Z80-Directives" rel="prev" title="Z80 Directives">
  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-Opcodes"></a>
  57. <div class="header">
  58. <p>
  59. Previous: <a href="Z80-Directives.html#Z80-Directives" accesskey="p" rel="prev">Z80 Directives</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="Opcodes-22"></a>
  63. <h4 class="subsection">9.56.5 Opcodes</h4>
  64. <p>In line with common practice, Z80 mnemonics are used for the Z80,
  65. Z80N, Z180, eZ80, Ascii R800 and the GameBoy Z80.
  66. </p>
  67. <p>In many instructions it is possible to use one of the half index
  68. registers (&lsquo;<samp>ixl</samp>&rsquo;,&lsquo;<samp>ixh</samp>&rsquo;,&lsquo;<samp>iyl</samp>&rsquo;,&lsquo;<samp>iyh</samp>&rsquo;) in stead of an
  69. 8-bit general purpose register. This yields instructions that are
  70. documented on the eZ80 and the R800, undocumented on the Z80 and
  71. unsupported on the Z180.
  72. Similarly <code>in f,(c)</code> is documented on the R800, undocumented on
  73. the Z80 and unsupported on the Z180 and the eZ80.
  74. </p>
  75. <p>The assembler also supports the following undocumented Z80-instructions,
  76. that have not been adopted in any other instruction set:
  77. </p><dl compact="compact">
  78. <dt><code>out (c),0</code></dt>
  79. <dd><p>Sends zero to the port pointed to by register <code>C</code>.
  80. </p>
  81. </dd>
  82. <dt><code>sli <var>m</var></code></dt>
  83. <dd><p>Equivalent to <code><var>m</var> = (<var>m</var>&lt;&lt;1)+1</code>, the operand <var>m</var> can
  84. be any operand that is valid for &lsquo;<samp>sla</samp>&rsquo;. One can use &lsquo;<samp>sll</samp>&rsquo; as a
  85. synonym for &lsquo;<samp>sli</samp>&rsquo;.
  86. </p>
  87. </dd>
  88. <dt><code><var>op</var> (ix+<var>d</var>), <var>r</var></code></dt>
  89. <dd><p>This is equivalent to
  90. </p>
  91. <div class="example">
  92. <pre class="example">ld <var>r</var>, (ix+<var>d</var>)
  93. <var>op</var> <var>r</var>
  94. ld (ix+<var>d</var>), <var>r</var>
  95. </pre></div>
  96. <p>The operation &lsquo;<samp><var>op</var></samp>&rsquo; may be any of &lsquo;<samp>res <var>b</var>,</samp>&rsquo;,
  97. &lsquo;<samp>set <var>b</var>,</samp>&rsquo;, &lsquo;<samp>rl</samp>&rsquo;, &lsquo;<samp>rlc</samp>&rsquo;, &lsquo;<samp>rr</samp>&rsquo;, &lsquo;<samp>rrc</samp>&rsquo;,
  98. &lsquo;<samp>sla</samp>&rsquo;, &lsquo;<samp>sli</samp>&rsquo;, &lsquo;<samp>sra</samp>&rsquo; and &lsquo;<samp>srl</samp>&rsquo;, and the register
  99. &lsquo;<samp><var>r</var></samp>&rsquo; may be any of &lsquo;<samp>a</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo;, &lsquo;<samp>c</samp>&rsquo;, &lsquo;<samp>d</samp>&rsquo;,
  100. &lsquo;<samp>e</samp>&rsquo;, &lsquo;<samp>h</samp>&rsquo; and &lsquo;<samp>l</samp>&rsquo;.
  101. </p>
  102. </dd>
  103. <dt><code><var>op</var> (iy+<var>d</var>), <var>r</var></code></dt>
  104. <dd><p>As above, but with &lsquo;<samp>iy</samp>&rsquo; instead of &lsquo;<samp>ix</samp>&rsquo;.
  105. </p></dd>
  106. </dl>
  107. <p>The web site at <a href="http://www.z80.info">http://www.z80.info</a> is a good starting place to
  108. find more information on programming the Z80.
  109. </p>
  110. <p>You may enable or disable any of these instructions for any target CPU
  111. even this instruction is not supported by any real CPU of this type.
  112. Useful for custom CPU cores.
  113. </p>
  114. <hr>
  115. <div class="header">
  116. <p>
  117. Previous: <a href="Z80-Directives.html#Z80-Directives" accesskey="p" rel="prev">Z80 Directives</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>
  118. </div>
  119. </body>
  120. </html>