toolchain/share/doc/as.html/Z8000-Directives.html

95 lines
4.6 KiB
HTML
Raw Permalink Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>Z8000 Directives - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Z8000_002dDependent.html#Z8000_002dDependent" title="Z8000-Dependent">
<link rel="prev" href="Z8000-Syntax.html#Z8000-Syntax" title="Z8000 Syntax">
<link rel="next" href="Z8000-Opcodes.html#Z8000-Opcodes" title="Z8000 Opcodes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2019 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Z8000-Directives"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Z8000-Opcodes.html#Z8000-Opcodes">Z8000 Opcodes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Z8000-Syntax.html#Z8000-Syntax">Z8000 Syntax</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Z8000_002dDependent.html#Z8000_002dDependent">Z8000-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.57.3 Assembler Directives for the Z8000</h4>
<p><a name="index-Z8000-directives-2707"></a><a name="index-directives_002c-Z8000-2708"></a>The Z8000 port of as includes additional assembler directives,
for compatibility with other Z8000 assemblers. These do not begin with
&lsquo;<samp><span class="samp">.</span></samp>&rsquo; (unlike the ordinary as directives).
<a name="index-segm-2709"></a>
<dl><dt><code>segm</code><dd><a name="index-g_t_002ez8001-2710"></a><dt><code>.z8001</code><dd>Generate code for the segmented Z8001.
<p><a name="index-unsegm-2711"></a><br><dt><code>unsegm</code><dd><a name="index-g_t_002ez8002-2712"></a><dt><code>.z8002</code><dd>Generate code for the unsegmented Z8002.
<p><a name="index-name-2713"></a><br><dt><code>name</code><dd>Synonym for <code>.file</code>
<p><a name="index-global-2714"></a><br><dt><code>global</code><dd>Synonym for <code>.global</code>
<p><a name="index-wval-2715"></a><br><dt><code>wval</code><dd>Synonym for <code>.word</code>
<p><a name="index-lval-2716"></a><br><dt><code>lval</code><dd>Synonym for <code>.long</code>
<p><a name="index-bval-2717"></a><br><dt><code>bval</code><dd>Synonym for <code>.byte</code>
<p><a name="index-sval-2718"></a><br><dt><code>sval</code><dd>Assemble a string. <code>sval</code> expects one string literal, delimited by
single quotes. It assembles each byte of the string into consecutive
addresses. You can use the escape sequence &lsquo;<samp><span class="samp">%</span><var>xx</var></samp>&rsquo; (where
<var>xx</var> represents a two-digit hexadecimal number) to represent the
character whose <span class="sc">ascii</span> value is <var>xx</var>. Use this feature to
describe single quote and other characters that may not appear in string
literals as themselves. For example, the C statement &lsquo;<samp><span class="samp">char&nbsp;*a&nbsp;=&nbsp;"he&nbsp;said&nbsp;\"it's&nbsp;50%&nbsp;off\"";</span></samp>&rsquo;<!-- /@w --> is represented in Z8000 assembly language
(shown with the assembler output in hex at the left) as
<pre class="smallexample"> 68652073 sval 'he said %22it%27s 50%25 off%22%00'
61696420
22697427
73203530
25206F66
662200
</pre>
<p><a name="index-rsect-2719"></a><br><dt><code>rsect</code><dd>synonym for <code>.section</code>
<p><a name="index-block-2720"></a><br><dt><code>block</code><dd>synonym for <code>.space</code>
<p><a name="index-even-2721"></a><br><dt><code>even</code><dd>special case of <code>.align</code>; aligns output to even byte boundary.
</dl>
</body></html>