🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7790

Re: 68k Asm Q re - indexed eff. addr. (HELP)

#7790
From: Larry Phillips
Date: Thu, 03 Jan 1991 19:18
37 lines
1856 bytes
In <1991Jan2.164434.45993@cc.usu.edu>, sl195@cc.usu.edu (A banana is not a toy) writes:
>I'm trying to get SAS/C5.10's asm assembler to compile, and it won't take
>
>	MOVE.L #0(A2,D0),D2
>or
>	MOVE.L (0,A2,D0),D2
>
>any hints on making this work? (i.e. what's the obvious answer that's
>staring me in the face but I'm too spaced at the moment to see it?)

Well, it sort of depends on what it is you are trying to do. The '#' would seem
to indicate that you want to move the address of something to d2, while the
second one looks like you want to move the contents of that address to d2.
Though you probably want to do the latter, I'll mention both operations...

   move.l   a0,d2
   add.l    d0,d2

The above will get you the address generated by the address in a0, indexed by
the value in d0, and will place the result in d2.

More likely you are trying to do...

   move.l   0(a0,d0),d2

Which will move the contents of the longword at the address contained in a0,
indexed by the value in d0

-larry

--
The best way to accelerate an MsDos machine is at 32 ft/sec/sec.
+-----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                 |
| \X/    lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
|        COMPUSERVE: 76703,4322  -or-  76703.4322@compuserve.com        |
+-----------------------------------------------------------------------+
Technical Details
Message-ID: <2465@lpami.wimsey.bc.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!
From: lphillips@lpami.wimsey.bc.ca (Larry Phillips)
Newsgroups: comp.sys.amiga.tech
Subject: Re: 68k Asm Q re - indexed eff. addr. (HELP)
Message-ID: <2465@lpami.wimsey.bc.ca>
Date: 3 Jan 91 19:18:15 GMT
Lines: 37
Return-Path: <lpami!lphillips>
To: van-bc!rnews