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 5Copyright (C) 1991-2021 Free Software Foundation, Inc. 6 7Permission is granted to copy, distribute and/or modify this document 8under the terms of the GNU Free Documentation License, Version 1.3 9or any later version published by the Free Software Foundation; 10with no Invariant Sections, with no Front-Cover Texts, and with no 11Back-Cover Texts. A copy of the license is included in the 12section entitled "GNU Free Documentation License". 13 --> 14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 15<head> 16<title>Using as: s390 Operands</title> 17 18<meta name="description" content="Using as: s390 Operands"> 19<meta name="keywords" content="Using as: s390 Operands"> 20<meta name="resource-type" content="document"> 21<meta name="distribution" content="global"> 22<meta name="Generator" content="makeinfo"> 23<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 24<link href="index.html#Top" rel="start" title="Top"> 25<link href="AS-Index.html#AS-Index" rel="index" title="AS Index"> 26<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 27<link href="s390-Syntax.html#s390-Syntax" rel="up" title="s390 Syntax"> 28<link href="s390-Formats.html#s390-Formats" rel="next" title="s390 Formats"> 29<link href="s390-Mnemonics.html#s390-Mnemonics" rel="previous" title="s390 Mnemonics"> 30<style type="text/css"> 31<!-- 32a.summary-letter {text-decoration: none} 33blockquote.smallquotation {font-size: smaller} 34div.display {margin-left: 3.2em} 35div.example {margin-left: 3.2em} 36div.indentedblock {margin-left: 3.2em} 37div.lisp {margin-left: 3.2em} 38div.smalldisplay {margin-left: 3.2em} 39div.smallexample {margin-left: 3.2em} 40div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 41div.smalllisp {margin-left: 3.2em} 42kbd {font-style:oblique} 43pre.display {font-family: inherit} 44pre.format {font-family: inherit} 45pre.menu-comment {font-family: serif} 46pre.menu-preformatted {font-family: serif} 47pre.smalldisplay {font-family: inherit; font-size: smaller} 48pre.smallexample {font-size: smaller} 49pre.smallformat {font-family: inherit; font-size: smaller} 50pre.smalllisp {font-size: smaller} 51span.nocodebreak {white-space:nowrap} 52span.nolinebreak {white-space:nowrap} 53span.roman {font-family:serif; font-weight:normal} 54span.sansserif {font-family:sans-serif; font-weight:normal} 55ul.no-bullet {list-style: none} 56--> 57</style> 58 59 60</head> 61 62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 63<a name="s390-Operands"></a> 64<div class="header"> 65<p> 66Next: <a href="s390-Formats.html#s390-Formats" accesskey="n" rel="next">s390 Formats</a>, Previous: <a href="s390-Mnemonics.html#s390-Mnemonics" accesskey="p" rel="previous">s390 Mnemonics</a>, Up: <a href="s390-Syntax.html#s390-Syntax" accesskey="u" rel="up">s390 Syntax</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> 67</div> 68<hr> 69<a name="Instruction-Operands"></a> 70<h4 class="subsubsection">9.41.3.3 Instruction Operands</h4> 71<a name="index-instruction-operands_002c-s390"></a> 72<a name="index-s390-instruction-operands"></a> 73 74<p>Instruction operands can be grouped into three classes, operands located 75in registers, immediate operands, and operands in storage. 76</p> 77<p>A register operand can be located in general, floating-point, access, 78or control register. The register is identified by a four-bit field. 79The field containing the register operand is called the R field. 80</p> 81<p>Immediate operands are contained within the instruction and can have 828, 16 or 32 bits. The field containing the immediate operand is called 83the I field. Dependent on the instruction the I field is either signed 84or unsigned. 85</p> 86<p>A storage operand consists of an address and a length. The address of a 87storage operands can be specified in any of these ways: 88</p> 89<ul> 90<li> The content of a single general R 91</li><li> The sum of the content of a general register called the base 92register B plus the content of a displacement field D 93</li><li> The sum of the contents of two general registers called the 94index register X and the base register B plus the content of a 95displacement field 96</li><li> The sum of the current instruction address and a 32-bit signed 97immediate field multiplied by two. 98</li></ul> 99 100<p>The length of a storage operand can be: 101</p> 102<ul> 103<li> Implied by the instruction 104</li><li> Specified by a bitmask 105</li><li> Specified by a four-bit or eight-bit length field L 106</li><li> Specified by the content of a general register 107</li></ul> 108 109<p>The notation for storage operand addresses formed from multiple fields is 110as follows: 111</p> 112<dl compact="compact"> 113<dt><code>Dn(Bn)</code></dt> 114<dd><p>the address for operand number n is formed from the content of general 115register Bn called the base register and the displacement field Dn. 116</p></dd> 117<dt><code>Dn(Xn,Bn)</code></dt> 118<dd><p>the address for operand number n is formed from the content of general 119register Xn called the index register, general register Bn called the 120base register and the displacement field Dn. 121</p></dd> 122<dt><code>Dn(Ln,Bn)</code></dt> 123<dd><p>the address for operand number n is formed from the content of general 124register Bn called the base register and the displacement field Dn. 125The length of the operand n is specified by the field Ln. 126</p></dd> 127</dl> 128 129<p>The base registers Bn and the index registers Xn of a storage operand can 130be skipped. If Bn and Xn are skipped, a zero will be stored to the operand 131field. The notation changes as follows: 132</p> 133<div class="display"> 134<table> 135<thead><tr><th width="30%"><pre class="display">full notation</pre></th><th width="30%"><pre class="display">short notation</pre></th></tr></thead> 136<tr><td width="30%"><pre class="display">Dn(0,Bn)</pre></td><td width="30%"><pre class="display">Dn(Bn)</pre></td></tr> 137<tr><td width="30%"><pre class="display">Dn(0,0)</pre></td><td width="30%"><pre class="display">Dn</pre></td></tr> 138<tr><td width="30%"><pre class="display">Dn(0)</pre></td><td width="30%"><pre class="display">Dn</pre></td></tr> 139<tr><td width="30%"><pre class="display">Dn(Ln,0)</pre></td><td width="30%"><pre class="display">Dn(Ln)</pre></td></tr> 140</table> 141</div> 142 143 144<hr> 145<div class="header"> 146<p> 147Next: <a href="s390-Formats.html#s390-Formats" accesskey="n" rel="next">s390 Formats</a>, Previous: <a href="s390-Mnemonics.html#s390-Mnemonics" accesskey="p" rel="previous">s390 Mnemonics</a>, Up: <a href="s390-Syntax.html#s390-Syntax" accesskey="u" rel="up">s390 Syntax</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> 148</div> 149 150 151 152</body> 153</html> 154