Re: A92: Addressing mode
[Prev][Next][Index][Thread]
Re: A92: Addressing mode
Sudan Christoph wrote:
>
> I've just a question concerning the addressing modes.
> I already asked Keith Kirton. He told me tat there
> must be a bug in the compiler A68k. If someone is
> able to give me an answer, pleas read the following
> explication.
>
> My problem concern the indexed addressing mode with
> a data register:
>
> LEA (A5,D7.w),A5
>
> The compiler isn't able to create the right object
> code!
>
> A little program for illustrate it:
> ;****************************
> xdef _main
> xdef _comment
> _main:
> LEA (A5,D7.w),A5
> Move.w (A5),D4
> Move.w D4,D5
> RTS
> _comment:
> dc.b "TryOut",0
> END
> ;****************************
>
> Look at the following object code created by the A86k.exe:
>
> ;ooooooooooooooooooooooooooooooooooo
> K
> 8:Nu4I`Versuch _main
> _comment A5,D7.w
>
> ;ooooooooooooooooooooooooooooooooooo
>
> I know it's absolutely normal that nobody understand it
> (without an object code list and hex editor!!) . The only
> thing possible to read are the labels _main and _comment
> and the file name VERSUCH.ASM (-> normal!?), and finaly the
> expression A5,D7.w. It's evident, this expression can't be
> object code.
>
> If somebody know to fix this bug please mail me!
>
> Thank you for your patience.
>
> Sudan Christoph
> e-mail: e98csuda@eif.ch
>
> If you prefer it, you can mail me in French or German too:)
First of all, I did NOT say that there MUST be a bug in the
compiler. I only said that a bug in the compiler was one of
three possibilities that I thought of just off the top of my
head...my first suspicion (assuming you used correct syntax)
is that the linker has a problem not the ASSEMBLER (please
stop calling it a compiler...it isn't!!!). Have you tried
passing different switch parameters to A68K and your linker?
There may be a default setting that forbids addressing as
such unless you provide a different setting (I haven't used
A68K in over 10 years so I don't remember).
Also, I our original discussion involved the MOVE instruction,
not the LEA instruction...you must take more care not to take
something I said and start comparing apples to oranges with it.
I haven't had time to start programming my TI yet (not enough
time)...but I'm on this forum because I love the 68000 family
of microprocessors.
Oh, try using the full form of the instruction:
LEA.L 0(A5,D7.W),A5 ; A68K should like this form
LEA.L (0,A5,D7.W),A5 ; other assemblers prefer this form
Keith Kirton
References: