dix@clinet.FI (Risto Kaivola) (08/19/90)
Is the current (or de facto) standard for the Amiga assembler syntax described in The AmigaDOS Manual 2nd Edition, part Developer's Manual, chapter 'The Macro Assembler'? If it isn't (is only an overview of the standard), from where can I get the standard? In the rest of this article, I assume that the standard is indeed described in that book. So, I have the following questions. 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 :-)? Anyway, now it seems to be that we've got two different standards. What I'm asking is the correct Amiga-expression for the following Effective Addressing Modes: The Name Of the Addressing Mode Motorola Assembler Syntax 1) Memory Indirect Postindexed ([bd,An],Xn,od) 2) Memory Indirect Preindexed ([bd,An,Xn],od) 3) PC Memory Indirect Postindexed ([bd,PC],Xn,od) 4) PC Memory Indirect Preindexed ([bd,PC,Xn],od) I don't know of any assembler that let's me to use the Motorola syntax, so I thought there might be general interest to discuss this topic (provided that it hasn't been discussed before...). Information appreciated, Risto -- Risto Kaivola Jakalatie 2 B 10 Internet: dix@clinet.fi 00730 Helsinki UUCP: ...mcsun!santra!clinet!dix FINLAND VOICE: + 358 0 367 249
eeh@btr.BTR.COM (Eduardo E. Horvath eeh@btr.com) (08/20/90)
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 =========================================================================