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)
> and if someone would please tell me what those are and how to word
them
> correctly into the a68k assembler, I would greatly appreciate it. To
> get more specific, I've seen these on almost all the commands (like
> ADD):
> ADD (d16,An),Dn
>
> I've tried doing "ADD (#15,A0),D1" to see if that's what it meant,
but
> after assembling (to check) it came up with an error in the linking
to
> 92p part.
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 !
Let's take a look at an example :
The correct sentence is the following :
add.w 0(d0,a0),d1
and it will add the value stored at the adress pointed by a0 + d0, to
d1 !
But it works only with d0-d6 registers, you can't put a constant
instead of d0 !
Instead of doing "add (#15,a0),d1", you should write :
Add 15(a0),d1
Which will increase d1 by the value stored at the adress a0+15 !
For the one with PC, it is almost the same thing, except than PC
(Program counter) is the adress of the current line of your prog !
Hope this helps, and that you have understand what I meant even if I
can't explain it very well in english!
Bye
==
_________________________________
TCHI
Christophe FONDACCI
E-mail : tchi_98@yahoo.com
ICQ : 12252327
_________________________________
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com