1<html lang="en"> 2<head> 3<title>M - Using as</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using as"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Invoking.html#Invoking" title="Invoking"> 9<link rel="prev" href="listing.html#listing" title="listing"> 10<link rel="next" href="MD.html#MD" title="MD"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13This file documents the GNU Assembler "as". 14 15Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 162000, 2001, 2002, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 17Inc. 18 19Permission is granted to copy, distribute and/or modify this document 20under the terms of the GNU Free Documentation License, Version 1.3 21or any later version published by the Free Software Foundation; 22with no Invariant Sections, with no Front-Cover Texts, and with no 23Back-Cover Texts. A copy of the license is included in the 24section entitled ``GNU Free Documentation License''. 25 26--> 27<meta http-equiv="Content-Style-Type" content="text/css"> 28<style type="text/css"><!-- 29 pre.display { font-family:inherit } 30 pre.format { font-family:inherit } 31 pre.smalldisplay { font-family:inherit; font-size:smaller } 32 pre.smallformat { font-family:inherit; font-size:smaller } 33 pre.smallexample { font-size:smaller } 34 pre.smalllisp { font-size:smaller } 35 span.sc { font-variant:small-caps } 36 span.roman { font-family:serif; font-weight:normal; } 37 span.sansserif { font-family:sans-serif; font-weight:normal; } 38--></style> 39<link rel="stylesheet" type="text/css" href="../cs.css"> 40</head> 41<body> 42<div class="node"> 43<a name="M"></a> 44<p> 45Next: <a rel="next" accesskey="n" href="MD.html#MD">MD</a>, 46Previous: <a rel="previous" accesskey="p" href="listing.html#listing">listing</a>, 47Up: <a rel="up" accesskey="u" href="Invoking.html#Invoking">Invoking</a> 48<hr> 49</div> 50 51<h3 class="section">2.9 Assemble in MRI Compatibility Mode: <samp><span class="option">-M</span></samp></h3> 52 53<p><a name="index-g_t_002dM-79"></a><a name="index-MRI-compatibility-mode-80"></a>The <samp><span class="option">-M</span></samp> or <samp><span class="option">--mri</span></samp> option selects MRI compatibility mode. This 54changes the syntax and pseudo-op handling of <samp><span class="command">as</span></samp> to make it 55compatible with the <code>ASM68K</code> or the <code>ASM960</code> (depending upon the 56configured target) assembler from Microtec Research. The exact nature of the 57MRI syntax will not be documented here; see the MRI manuals for more 58information. Note in particular that the handling of macros and macro 59arguments is somewhat different. The purpose of this option is to permit 60assembling existing MRI assembler code using <samp><span class="command">as</span></samp>. 61 62 <p>The MRI compatibility is not complete. Certain operations of the MRI assembler 63depend upon its object file format, and can not be supported using other object 64file formats. Supporting these would require enhancing each object file format 65individually. These are: 66 67 <ul> 68<li>global symbols in common section 69 70 <p>The m68k MRI assembler supports common sections which are merged by the linker. 71Other object file formats do not support this. <samp><span class="command">as</span></samp> handles 72common sections by treating them as a single common symbol. It permits local 73symbols to be defined within a common section, but it can not support global 74symbols, since it has no way to describe them. 75 76 <li>complex relocations 77 78 <p>The MRI assemblers support relocations against a negated section address, and 79relocations which combine the start addresses of two or more sections. These 80are not support by other object file formats. 81 82 <li><code>END</code> pseudo-op specifying start address 83 84 <p>The MRI <code>END</code> pseudo-op permits the specification of a start address. 85This is not supported by other object file formats. The start address may 86instead be specified using the <samp><span class="option">-e</span></samp> option to the linker, or in a linker 87script. 88 89 <li><code>IDNT</code>, <code>.ident</code> and <code>NAME</code> pseudo-ops 90 91 <p>The MRI <code>IDNT</code>, <code>.ident</code> and <code>NAME</code> pseudo-ops assign a module 92name to the output file. This is not supported by other object file formats. 93 94 <li><code>ORG</code> pseudo-op 95 96 <p>The m68k MRI <code>ORG</code> pseudo-op begins an absolute section at a given 97address. This differs from the usual <samp><span class="command">as</span></samp> <code>.org</code> pseudo-op, 98which changes the location within the current section. Absolute sections are 99not supported by other object file formats. The address of a section may be 100assigned within a linker script. 101</ul> 102 103 <p>There are some other features of the MRI assembler which are not supported by 104<samp><span class="command">as</span></samp>, typically either because they are difficult or because they 105seem of little consequence. Some of these may be supported in future releases. 106 107 <ul> 108<li>EBCDIC strings 109 110 <p>EBCDIC strings are not supported. 111 112 <li>packed binary coded decimal 113 114 <p>Packed binary coded decimal is not supported. This means that the <code>DC.P</code> 115and <code>DCB.P</code> pseudo-ops are not supported. 116 117 <li><code>FEQU</code> pseudo-op 118 119 <p>The m68k <code>FEQU</code> pseudo-op is not supported. 120 121 <li><code>NOOBJ</code> pseudo-op 122 123 <p>The m68k <code>NOOBJ</code> pseudo-op is not supported. 124 125 <li><code>OPT</code> branch control options 126 127 <p>The m68k <code>OPT</code> branch control options—<code>B</code>, <code>BRS</code>, <code>BRB</code>, 128<code>BRL</code>, and <code>BRW</code>—are ignored. <samp><span class="command">as</span></samp> automatically 129relaxes all branches, whether forward or backward, to an appropriate size, so 130these options serve no purpose. 131 132 <li><code>OPT</code> list control options 133 134 <p>The following m68k <code>OPT</code> list control options are ignored: <code>C</code>, 135<code>CEX</code>, <code>CL</code>, <code>CRE</code>, <code>E</code>, <code>G</code>, <code>I</code>, <code>M</code>, 136<code>MEX</code>, <code>MC</code>, <code>MD</code>, <code>X</code>. 137 138 <li>other <code>OPT</code> options 139 140 <p>The following m68k <code>OPT</code> options are ignored: <code>NEST</code>, <code>O</code>, 141<code>OLD</code>, <code>OP</code>, <code>P</code>, <code>PCO</code>, <code>PCR</code>, <code>PCS</code>, <code>R</code>. 142 143 <li><code>OPT</code> <code>D</code> option is default 144 145 <p>The m68k <code>OPT</code> <code>D</code> option is the default, unlike the MRI assembler. 146<code>OPT NOD</code> may be used to turn it off. 147 148 <li><code>XREF</code> pseudo-op. 149 150 <p>The m68k <code>XREF</code> pseudo-op is ignored. 151 152 <li><code>.debug</code> pseudo-op 153 154 <p>The i960 <code>.debug</code> pseudo-op is not supported. 155 156 <li><code>.extended</code> pseudo-op 157 158 <p>The i960 <code>.extended</code> pseudo-op is not supported. 159 160 <li><code>.list</code> pseudo-op. 161 162 <p>The various options of the i960 <code>.list</code> pseudo-op are not supported. 163 164 <li><code>.optimize</code> pseudo-op 165 166 <p>The i960 <code>.optimize</code> pseudo-op is not supported. 167 168 <li><code>.output</code> pseudo-op 169 170 <p>The i960 <code>.output</code> pseudo-op is not supported. 171 172 <li><code>.setreal</code> pseudo-op 173 174 <p>The i960 <code>.setreal</code> pseudo-op is not supported. 175 176 </ul> 177 178 </body></html> 179 180