134 lines
6.1 KiB
HTML
134 lines
6.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This file documents the GNU Assembler "as".
|
|
|
|
Copyright (C) 1991-2016 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".
|
|
-->
|
|
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Using as: ESA/390 Syntax</title>
|
|
|
|
<meta name="description" content="Using as: ESA/390 Syntax">
|
|
<meta name="keywords" content="Using as: ESA/390 Syntax">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="ESA_002f390_002dDependent.html#ESA_002f390_002dDependent" rel="up" title="ESA/390-Dependent">
|
|
<link href="ESA_002f390-Floating-Point.html#ESA_002f390-Floating-Point" rel="next" title="ESA/390 Floating Point">
|
|
<link href="ESA_002f390-Options.html#ESA_002f390-Options" rel="prev" title="ESA/390 Options">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.indentedblock {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style:oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nocodebreak {white-space:nowrap}
|
|
span.nolinebreak {white-space:nowrap}
|
|
span.roman {font-family:serif; font-weight:normal}
|
|
span.sansserif {font-family:sans-serif; font-weight:normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
<a name="ESA_002f390-Syntax"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="ESA_002f390-Floating-Point.html#ESA_002f390-Floating-Point" accesskey="n" rel="next">ESA/390 Floating Point</a>, Previous: <a href="ESA_002f390-Options.html#ESA_002f390-Options" accesskey="p" rel="prev">ESA/390 Options</a>, Up: <a href="ESA_002f390_002dDependent.html#ESA_002f390_002dDependent" accesskey="u" rel="up">ESA/390-Dependent</a> [<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>
|
|
</div>
|
|
<hr>
|
|
<a name="Syntax-13"></a>
|
|
<h4 class="subsection">9.14.3 Syntax</h4>
|
|
<p>The opcode/operand syntax follows the ESA/390 Principles of Operation
|
|
manual; assembler directives and general syntax are loosely based on the
|
|
prevailing AT&T/SVR4/ELF/Solaris style notation. HLASM-style directives
|
|
are <em>not</em> supported for the most part, with the exception of those
|
|
described herein.
|
|
</p>
|
|
<p>A leading dot in front of directives is optional, and the case of
|
|
directives is ignored; thus for example, .using and USING have the same
|
|
effect.
|
|
</p>
|
|
<p>A colon may immediately follow a label definition. This is
|
|
simply for compatibility with how most assembly language programmers
|
|
write code.
|
|
</p>
|
|
<p>‘<samp>#</samp>’ is the line comment character.
|
|
</p>
|
|
<p>‘<samp>;</samp>’ can be used instead of a newline to separate statements.
|
|
</p>
|
|
<p>Since ‘<samp>$</samp>’ has no special meaning, you may use it in symbol names.
|
|
</p>
|
|
<p>Registers can be given the symbolic names r0..r15, fp0, fp2, fp4, fp6.
|
|
By using thesse symbolic names, <code>as</code> can detect simple
|
|
syntax errors. The name rarg or r.arg is a synonym for r11, rtca or r.tca
|
|
for r12, sp, r.sp, dsa r.dsa for r13, lr or r.lr for r14, rbase or r.base
|
|
for r3 and rpgt or r.pgt for r4.
|
|
</p>
|
|
<p>‘<samp>*</samp>’ is the current location counter. Unlike ‘<samp>.</samp>’ it is always
|
|
relative to the last USING directive. Note that this means that
|
|
expressions cannot use multiplication, as any occurrence of ‘<samp>*</samp>’
|
|
will be interpreted as a location counter.
|
|
</p>
|
|
<p>All labels are relative to the last USING. Thus, branches to a label
|
|
always imply the use of base+displacement.
|
|
</p>
|
|
<p>Many of the usual forms of address constants / address literals
|
|
are supported. Thus,
|
|
</p><div class="example">
|
|
<pre class="example"> .using *,r3
|
|
L r15,=A(some_routine)
|
|
LM r6,r7,=V(some_longlong_extern)
|
|
A r1,=F'12'
|
|
AH r0,=H'42'
|
|
ME r6,=E'3.1416'
|
|
MD r6,=D'3.14159265358979'
|
|
O r6,=XL4'cacad0d0'
|
|
.ltorg
|
|
</pre></div>
|
|
<p>should all behave as expected: that is, an entry in the literal
|
|
pool will be created (or reused if it already exists), and the
|
|
instruction operands will be the displacement into the literal pool
|
|
using the current base register (as last declared with the <code>.using</code>
|
|
directive).
|
|
</p>
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="ESA_002f390-Floating-Point.html#ESA_002f390-Floating-Point" accesskey="n" rel="next">ESA/390 Floating Point</a>, Previous: <a href="ESA_002f390-Options.html#ESA_002f390-Options" accesskey="p" rel="prev">ESA/390 Options</a>, Up: <a href="ESA_002f390_002dDependent.html#ESA_002f390_002dDependent" accesskey="u" rel="up">ESA/390-Dependent</a> [<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>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|