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: M</title> 17 18<meta name="description" content="Using as: M"> 19<meta name="keywords" content="Using as: M"> 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="Invoking.html#Invoking" rel="up" title="Invoking"> 28<link href="MD.html#MD" rel="next" title="MD"> 29<link href="listing.html#listing" rel="previous" title="listing"> 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="M"></a> 64<div class="header"> 65<p> 66Next: <a href="MD.html#MD" accesskey="n" rel="next">MD</a>, Previous: <a href="listing.html#listing" accesskey="p" rel="previous">listing</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</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="Assemble-in-MRI-Compatibility-Mode_003a-_002dM"></a> 70<h3 class="section">2.9 Assemble in MRI Compatibility Mode: <samp>-M</samp></h3> 71 72<a name="index-_002dM"></a> 73<a name="index-MRI-compatibility-mode"></a> 74<p>The <samp>-M</samp> or <samp>--mri</samp> option selects MRI compatibility mode. This 75changes the syntax and pseudo-op handling of <code>as</code> to make it 76compatible with the <code>ASM68K</code> assembler from Microtec Research. 77The exact nature of the 78MRI syntax will not be documented here; see the MRI manuals for more 79information. Note in particular that the handling of macros and macro 80arguments is somewhat different. The purpose of this option is to permit 81assembling existing MRI assembler code using <code>as</code>. 82</p> 83<p>The MRI compatibility is not complete. Certain operations of the MRI assembler 84depend upon its object file format, and can not be supported using other object 85file formats. Supporting these would require enhancing each object file format 86individually. These are: 87</p> 88<ul> 89<li> global symbols in common section 90 91<p>The m68k MRI assembler supports common sections which are merged by the linker. 92Other object file formats do not support this. <code>as</code> handles 93common sections by treating them as a single common symbol. It permits local 94symbols to be defined within a common section, but it can not support global 95symbols, since it has no way to describe them. 96</p> 97</li><li> complex relocations 98 99<p>The MRI assemblers support relocations against a negated section address, and 100relocations which combine the start addresses of two or more sections. These 101are not support by other object file formats. 102</p> 103</li><li> <code>END</code> pseudo-op specifying start address 104 105<p>The MRI <code>END</code> pseudo-op permits the specification of a start address. 106This is not supported by other object file formats. The start address may 107instead be specified using the <samp>-e</samp> option to the linker, or in a linker 108script. 109</p> 110</li><li> <code>IDNT</code>, <code>.ident</code> and <code>NAME</code> pseudo-ops 111 112<p>The MRI <code>IDNT</code>, <code>.ident</code> and <code>NAME</code> pseudo-ops assign a module 113name to the output file. This is not supported by other object file formats. 114</p> 115</li><li> <code>ORG</code> pseudo-op 116 117<p>The m68k MRI <code>ORG</code> pseudo-op begins an absolute section at a given 118address. This differs from the usual <code>as</code> <code>.org</code> pseudo-op, 119which changes the location within the current section. Absolute sections are 120not supported by other object file formats. The address of a section may be 121assigned within a linker script. 122</p></li></ul> 123 124<p>There are some other features of the MRI assembler which are not supported by 125<code>as</code>, typically either because they are difficult or because they 126seem of little consequence. Some of these may be supported in future releases. 127</p> 128<ul> 129<li> EBCDIC strings 130 131<p>EBCDIC strings are not supported. 132</p> 133</li><li> packed binary coded decimal 134 135<p>Packed binary coded decimal is not supported. This means that the <code>DC.P</code> 136and <code>DCB.P</code> pseudo-ops are not supported. 137</p> 138</li><li> <code>FEQU</code> pseudo-op 139 140<p>The m68k <code>FEQU</code> pseudo-op is not supported. 141</p> 142</li><li> <code>NOOBJ</code> pseudo-op 143 144<p>The m68k <code>NOOBJ</code> pseudo-op is not supported. 145</p> 146</li><li> <code>OPT</code> branch control options 147 148<p>The m68k <code>OPT</code> branch control options—<code>B</code>, <code>BRS</code>, <code>BRB</code>, 149<code>BRL</code>, and <code>BRW</code>—are ignored. <code>as</code> automatically 150relaxes all branches, whether forward or backward, to an appropriate size, so 151these options serve no purpose. 152</p> 153</li><li> <code>OPT</code> list control options 154 155<p>The following m68k <code>OPT</code> list control options are ignored: <code>C</code>, 156<code>CEX</code>, <code>CL</code>, <code>CRE</code>, <code>E</code>, <code>G</code>, <code>I</code>, <code>M</code>, 157<code>MEX</code>, <code>MC</code>, <code>MD</code>, <code>X</code>. 158</p> 159</li><li> other <code>OPT</code> options 160 161<p>The following m68k <code>OPT</code> options are ignored: <code>NEST</code>, <code>O</code>, 162<code>OLD</code>, <code>OP</code>, <code>P</code>, <code>PCO</code>, <code>PCR</code>, <code>PCS</code>, <code>R</code>. 163</p> 164</li><li> <code>OPT</code> <code>D</code> option is default 165 166<p>The m68k <code>OPT</code> <code>D</code> option is the default, unlike the MRI assembler. 167<code>OPT NOD</code> may be used to turn it off. 168</p> 169</li><li> <code>XREF</code> pseudo-op. 170 171<p>The m68k <code>XREF</code> pseudo-op is ignored. 172</p> 173</li></ul> 174 175<hr> 176<div class="header"> 177<p> 178Next: <a href="MD.html#MD" accesskey="n" rel="next">MD</a>, Previous: <a href="listing.html#listing" accesskey="p" rel="previous">listing</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</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> 179</div> 180 181 182 183</body> 184</html> 185