Searching \ for '[EE] 68K assembly' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=68k+assembly
Search entire site for: '68K assembly'.

Exact match. Not showing close matches.
PICList Thread
'[EE] 68K assembly'
2005\08\30@100230 by James Humes

picon face
Hi all,
 A friend asked me what this means   move.w #5, +(A0, D1)
 I'm only proficient in pic assembly but I guessed that it meant move the data at A0+(D1+1) to register at 0x05. This means I guessed first that the (A0, D1) notation is an address and its offset and then I guessed that the +(A0, D1) increments D1. I haven't really used two parameter moves before so its likely I have this all backwords.   Actually, when I count the number of guess that each subsequent guess is based on, I think this is a house of cards just waiting to collapse.. anyone have experience that can explain this command?  Thanks a lot.
James

2005\08\30@102546 by Spehro Pefhany

picon face
At 08:02 AM 8/30/2005 -0600, you wrote:
>Hi all,
>   A friend asked me what this means
>   move.w #5, +(A0, D1)
>   I'm only proficient in pic assembly but I guessed that it meant move the
>data at A0+(D1+1) to register at 0x05. This means I guessed first that the
>(A0, D1) notation is an address and its offset and then I guessed that the
>+(A0, D1) increments D1. I haven't really used two parameter moves before so
>its likely I have this all backwords.
>   Actually, when I count the number of guess that each subsequent guess is
>based on, I think this is a house of cards just waiting to collapse.. anyone
>have experience that can explain this command?
>  Thanks a lot.
>  James

Have a look here:
http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\08\30@103440 by Shawn Tan

flavicon
face
>   move.w #5, +(A0, D1)

This isn't one of the original M68k addressing modes.. I've just
checked the 68k and coldfire PRMs, doesn't seem to be there.. but i'll
assume it exists and hazard a guess... It should be literal 5 into
preincremented indirect A0 with index D1.. The .W says that it'll
pre-increment by 2 bytes..

>   I'm only proficient in pic assembly but I guessed that it meant move the
> data at A0+(D1+1) to register at 0x05. This means I guessed first that the

M68K assembly has the destination as the 2nd operand, not the 1st..

> (A0, D1) notation is an address and its offset and then I guessed that the
> +(A0, D1) increments D1. I haven't really used two parameter moves before so
> its likely I have this all backwords.

It should be D1 sign-extended, scaled, added to A0 and pre-incremented...

>   Actually, when I count the number of guess that each subsequent guess is
> based on, I think this is a house of cards just waiting to collapse.. anyone
> have experience that can explain this command?

cheers..

with metta,
Shawn Tan.

2005\08\30@104224 by Mario Mendes Jr.

flavicon
face
I'm not going ot be much help to you on this, but I recently read a book
my cousin just wrote on one of the FreeScale processor lines and this
looks very similar to one of the parallel data move instructions.

Unfortunately I do not have the book here at work to confirm that.

But maybe this will help you out:
http://en.wikibooks.org/wiki/Programming:68K_assembly

Good luck.


-Mario

{Quote hidden}

> -

2005\08\30@104343 by Electron

flavicon
face
At 08.02 2005.08.30 -0600, you wrote:
>Hi all,
>  A friend asked me what this means
>  move.w #5, +(A0, D1)

although it looks like elegant 680x0 assembly, the line above means a big
"Syntax Error" in 680x0 assembly, sorry.

if you remove the "+", then it means "store the literal number 5 to the
16bit memory location pointed by A0 plus D1".

Note that if we remove D1, then the magic Syntax Error remains: +(A0) is not
one of the allowed addressing modes: -(A0) is, and (A0)+ is too, but not +(A0).


>  I'm only proficient in pic assembly but I guessed that it meant move the
>data at A0+(D1+1) to register at 0x05.

680x0 assembly syntax is "dst,src" .. not the "src,dst" you guessed.


> This means I guessed first that the
>(A0, D1) notation is an address and its offset and then I guessed that the
>+(A0, D1) increments D1. I haven't really used two parameter moves before so
>its likely I have this all backwords.
>  Actually, when I count the number of guess that each subsequent guess is
>based on, I think this is a house of cards just waiting to collapse.. anyone
>have experience that can explain this command?

I have (20)+ years of experience in the 680x0 assembly, I hope they're enough
for you. ;-)


> Thanks a lot.

You're wellcome a lot.


> James
>-

2005\08\30@105007 by James Humes

picon face
Yeah, but what page?  Just kidding, thanks for the link!  For all the anxious spectators:
I got the source/destination on the move backwards, but the rest of the guess was okay.  James

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...