Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!tekig7!tekig5!phils From: phils@tekig5.PEN.TEK.COM (Philip E Staub) Newsgroups: comp.sys.amiga Subject: Re: 68k asm question Message-ID: <1133@tekig7.MAP.TEK.COM> Date: 3 Jan 91 18:46:15 GMT References: <1991Jan2.104349.45968@cc.usu.edu> Sender: news@tekig7.MAP.TEK.COM Reply-To: phils@tekig5.PEN.TEK.COM (Philip E Staub) Organization: Tektronix, Inc., Beaverton, OR. Lines: 36 In article <1991Jan2.104349.45968@cc.usu.edu> sl195@cc.usu.edu (A banana is not a toy) writes: >I've been writing 68k code using SAS/C5.1's asm. The description in the >manuals describe this as using the standard Motorola formats for the >code, but I've not been able to get this to compile: > > MOVE.W #0(A0,D0),D2 > MOVE.W #0(A0,D1),D3 > >What I want is to be able to access a word in an array whose base address >is in A0, and whose displacement is stored in D0 and D1 (longwords). Try: MOVE.W 0(A0,D0),D2 MOVE.W 0(A0,D1),D3 Or simpler (in this case, since there is no offset: MOVE.W (A0,D0),D2 MOVE.W (A0,D1),D3 [..] >| Demetrios Triandafilakos | James Knowles | "Remember, always remember,| >| Shire of Cote du Ciel | BITNET: SL195@USU | my son -- a banana is not | >| Principality of Artemesia | INTERNET: | a toy." | >| Kingdom of Atenvelt | sl195@cc.usu.edu | - The Wise Guru | >=============================++++++++++++++++++++============================= > Be all that you can be - see your local SCA Knight Marshal now. Phil -- ------------------------------------------------------------------------------ Phil Staub, phils@mozart.PEN.TEK.COM Definition: BUG: A feature (present or absent) which is (at best) inconvenient.