Re: A92: serious help here please


[Prev][Next][Index][Thread]

Re: A92: serious help here please






>
>> I still don't get
>> what the following statements are:
>> (d16,An)
>> (d8,An,Xn)
>> (d16,PC)
>> (d8,PC,Xn)
>
>I think you mean the 0(Dn,An) intructions !
>I don't know about the ones with Xn, but for the 2 others, I think
>this could help you :
>
>The syntax 0(Dn,An) will increase An with Dn, and will then get the
>value stored at the adress pointed by An+Dn !


I recognize these notations from the Motorola Programmer's guide!

Address Register Indirect with Displacement Mode:
    Generation:         EA = (An) + d16
    Assembler Syntax:   (d16,An)

Address Register Indirect with Index (8-Bit Displacement) Mode:
    Generation:         EA = (An) + (Xn) + d8
    Assembler Syntax:   (d8,An,Xn.SIZE*SCALE)

Program Counter Indirect with Displacement Mode:
    Generation:         EA = (PC) + d16
    Assembler Syntax:   (d16,PC)

Program Counter Indirect with Index (8-Bit Displacement) Mode:
    Generation:         EA = (PC) + (Xn) + d8
    Assembler Syntax:   (d8,PC,Xn.SIZE*SCALE)

And bless Motorola for giving SAMPLE SOURCE CODE with the book! :)

What you are seeing (above) are refered to as Effective Addressing (EA)
Modes.  The 68K chip series supports something like 18 addressing modes.
This includes everything from the abstract referencing of data via
displacements to immediate data.

The guy who replied before me was completely correct with what he said.  I
wanted to clarify and confuse.  (Pause)  Let me explain: The manual seems to
show the syntax of commands one way as the a68k assembler does them a little
differently.  For instance:
    ADD    (D0,A0),D1    ; Using the Manual's syntax
    ADD    0(D0,A0),D1   ; Using what seems to be the A68K syntax
These commands would appear to do the same thing--Add the value at the
location specified by A0 offset by D0 to the value in D1.

The programmer's reference manual shows no such EA with the ability to add a
leading value to offset.  It really isn't that much of a concern for the
technicalities.  I'd suggest looking at other source code and see what the
a68k seems to "like."  You probably could get away with the EA modes' syntax
listed in the manual.  So if this info just confused you more, just ignore
it and get on with life!

====
Aaron Hill (Redmond, WA)
E-mail: SeracOhw24@msn.com
IRC Nick: SeracOhw (EF-Net)