M (Using as) (original) (raw)
2.10 Assemble in MRI Compatibility Mode: -M ¶
The -M or --mri option selects MRI compatibility mode. This changes the syntax and pseudo-op handling of as
to make it compatible with the ASM68K
assembler from Microtec Research. The exact nature of the MRI syntax will not be documented here; see the MRI manuals for more information. Note in particular that the handling of macros and macro arguments is somewhat different. The purpose of this option is to permit assembling existing MRI assembler code using as
.
The MRI compatibility is not complete. Certain operations of the MRI assembler depend upon its object file format, and can not be supported using other object file formats. Supporting these would require enhancing each object file format individually. These are:
- global symbols in common section
The m68k MRI assembler supports common sections which are merged by the linker. Other object file formats do not support this.as
handles common sections by treating them as a single common symbol. It permits local symbols to be defined within a common section, but it can not support global symbols, since it has no way to describe them. - complex relocations
The MRI assemblers support relocations against a negated section address, and relocations which combine the start addresses of two or more sections. These are not support by other object file formats. END
pseudo-op specifying start address
The MRIEND
pseudo-op permits the specification of a start address. This is not supported by other object file formats. The start address may instead be specified using the -e option to the linker, or in a linker script.IDNT
,.ident
andNAME
pseudo-ops
The MRIIDNT
,.ident
andNAME
pseudo-ops assign a module name to the output file. This is not supported by other object file formats.ORG
pseudo-op
The m68k MRIORG
pseudo-op begins an absolute section at a given address. This differs from the usualas
.org
pseudo-op, which changes the location within the current section. Absolute sections are not supported by other object file formats. The address of a section may be assigned within a linker script.
There are some other features of the MRI assembler which are not supported byas
, typically either because they are difficult or because they seem of little consequence. Some of these may be supported in future releases.
- EBCDIC strings
EBCDIC strings are not supported. - packed binary coded decimal
Packed binary coded decimal is not supported. This means that theDC.P
andDCB.P
pseudo-ops are not supported. FEQU
pseudo-op
The m68kFEQU
pseudo-op is not supported.NOOBJ
pseudo-op
The m68kNOOBJ
pseudo-op is not supported.OPT
branch control options
The m68kOPT
branch control options—B
,BRS
,BRB
,BRL
, andBRW
—are ignored.as
automatically relaxes all branches, whether forward or backward, to an appropriate size, so these options serve no purpose.OPT
list control options
The following m68kOPT
list control options are ignored:C
,CEX
,CL
,CRE
,E
,G
,I
,M
,MEX
,MC
,MD
,X
.- other
OPT
options
The following m68kOPT
options are ignored:NEST
,O
,OLD
,OP
,P
,PCO
,PCR
,PCS
,R
. OPT
D
option is default
The m68kOPT
D
option is the default, unlike the MRI assembler.OPT NOD
may be used to turn it off.XREF
pseudo-op.
The m68kXREF
pseudo-op is ignored.