Re: A92: Addressing mode


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

Re: A92: Addressing mode




 I'm a newbie to 68000 assembler but If I understand
the 'M68000 Motorola Family Programmer's Reference Manual'
(68kpm.pdf) correctly there is no addressing mode like
'(A5,D7.w)' for the 68000. You should look at page 215 for
the allowed addressing modes for LEA. For the 68000 it is
allowed only to use constant displacements with address
registers. The newer processors allow more flexible
ways to address the memory.

--
bernd.birkenbach@degussa-huels.de



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ù
85:$Nu4I`üVersuch   #ï!  "_main
       !  "_comment   0?  "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:)






Follow-Ups: