Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!decwrl!btr!eeh From: eeh@btr.BTR.COM (Eduardo E. Horvath eeh@btr.com) Newsgroups: comp.sys.amiga Subject: Re: The Amiga Assembler Standard Message-ID: <319@public.BTR.COM> Date: 20 Aug 90 00:22:32 GMT References: <2520@clinet.FI> Organization: BTR Public Access UNIX, MtnView CA, Contact: cs@btr.com 415-966-1429 Lines: 62 In article <2520@clinet.FI> dix@clinet.FI (Risto Kaivola) writes: [Stuff removed] > It seems to be that, in some cases, the Amiga form of effective > addressing mode differs from that of Motorola (e.g. Address > Register Indirect with Displacement). What was the reason for > the developers of the Amiga Macro Assembler to introduce this > kind of incompatibility (I'm just interested :-)? There are two standards for assemblers from Motorola. The 68000 originally had the offset outside the parentheses, i.e.: move.l 6(a6),8(a8,d4.w) With the advent of the 68020, Motorola was kind enough to provide assembler writers with a new syntax for addressing modes that had the displacement within the parentheses, i.e.: move.l (6,a6),(8,a8,d4.w) Both techniques are equivalent. Motorola currently prefers the second. However, most older assemblers only support the first method. Here is a table of indirect addressing modes: Mode Old New ------------------------------- ---------------- ---------------- Indirect + Displacement d(An) (d,An) Address reg. W/Index d(An,Xn) (d,An,Xn) PC W/Displacement d(PC) (d,PC) PC Relative W/Index d(PC,Xn) (d,PC,Xn) **** 68020+ ONLY ***** Memory Indirect Postindexed ([bd,An],Xn,od) Memory Indirect Preindexed ([bd,An,Xn],od) PC Indirect Postindexed ([bd,PC],Xn,od) PC Indirect Preindexed ([bd,PC,Xn],od) Remember, the first four modes listed will work on all the 680x0 family. The last four instructions will work on 68020 and newer models only. Unless you *KNOW* you will be running on an '020, '030, or '040, don't use those modes. If you try them on a 68000 or 68010, you will be visited by the GURU (or have a system error.) >Risto > Information appreciated, >-- >Risto Kaivola Jakalatie 2 B 10 >Internet: dix@clinet.fi 00730 Helsinki >UUCP: ...mcsun!santra!clinet!dix FINLAND >VOICE: + 358 0 367 249 ========================================================================= Eduardo Horvath eeh@btr.com ..!{decwrl,mips,fernwood}!btr!eeh "Trust me, I am cognisant of what I am doing." - Hammeroid =========================================================================