Rune.
Rune
Get a copy of the gas manual, either from gnu binutils or
<URL:http://www.cygnus.com/doc/as/as_toc.html>
If you understand Motorola standard assembly, the MIT stuff is pretty easy.
instead of a0-a7 and d0-d7, use %a0-%a7 and %d0-%d7 for register names.
Most of the assembly instructions are the same as the standard ones, but
with no ".", so move.l becomes movel, etc. One other thing is that MIT
format uses things like jbsr for jsr or bsr, so that the code doesn't
have to know the offset of the jump, GAS figures it out and uses the right
one.
That's about all I can think of off the top of my head.
--
Eric A. Kilpatrick
er...@dechub.lkg.dec.com
(508)486-6985
DTN: 6-6985
> That's about all I can think of off the top of my head.
The most annoying difference is the reversed cmp Syntax. Motorolas
cmp.l d1,d2 becomes cmpl %d2,%d1 which is pretty confusing.
--
Walter Misar mi...@rbg.informatik.th-darmstadt.de
mi...@hrz.th-darmstadt.de
GCS/M 1.0.1 d?(-+) -p+(-) c++ !l u++ e++(*) m+ s/-- !n h(*) f !g w+ t+(-) r+ y?
|> In article <3r2fep$c...@nntpd.lkg.dec.com>, er...@pe2k1.hpn.lkg.dec.com (Eric Kilpatrick) writes:
|>>
|>> If you understand Motorola standard assembly, the MIT stuff is pretty easy.
|>> That's about all I can think of off the top of my head.
|> The most annoying difference is the reversed cmp Syntax. Motorolas
|> cmp.l d1,d2 becomes cmpl %d2,%d1 which is pretty confusing.
This is not a Motorola vs. MIT thing, but rather a bug (I think) in
some SGS assembler (GCC has #define SGS_CMP_ORDER). Motorola defines
cmp A,B through the result of B-A (think of sub A,B without storing
the difference), and this does not change with the MIT syntax.
The main difference between Motorola and MIT syntax is that with the
latter indirection is indicated by postfix @, for example (a0) becomes
a0@, and ([a0,d0.l],10) becomes a0@(d0:l)@(10). The latter is easier
to parse, since the base register is always the first thing.
--
Andreas Schwab "And now for something
sch...@issan.informatik.uni-dortmund.de completely different"