sl195@cc.usu.edu (A banana is not a toy) (01/03/91)
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). I've also tried the following without it compiling, either: MOVE.W (0,A0,D0),D2 MOVE.W (0,A0,D1),D3 Anybody know what I'm not doing? (Yes, it's probably obvious and I'm just spacing it off.....) Anyhow, THANKS in advance!!! -- All comments are my own, and many must be taken with a :-) =============================++++++++++++++++++++============================= | 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.
bartonr@eecs.cs.pdx.edu (F A Bartonravitz) (01/03/91)
sl195@cc.usu.edu (A banana is not a toy) writes: > MOVE.W #0(A0,D0),D2 > MOVE.W #0(A0,D1),D3 ^ | ------- get rid of this
phils@tekig5.PEN.TEK.COM (Philip E Staub) (01/04/91)
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.
skipper@motaus.sps.mot.com (Skipper Smith) (01/04/91)
> MOVE.W #0(A0,D0),D2 > MOVE.W #0(A0,D1),D3 ^-- No pound sign is necessary although a $ might be used to indicate hexadecimal > MOVE.W (0,A0,D0),D2 > MOVE.W (0,A0,D1),D3 ^ ^ |-------| this is syntax to be used with the 68020 and greater. Some 68000 assemblers support it. Apparently yours does not. >-- > >All comments are my own, and many must be taken with a :-) >=============================++++++++++++++++++++============================= >| 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. -- Skipper Smith | skipper@motaus.sps.mot.com Motorola Technical Training | 8945 Guilford Rd Ste 145 All opinions are my own, not my employers | Columbia, MD 21046
csg019@cck.cov.ac.uk (-~=Zaphod=~-) (01/08/91)
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 You nearly cracked it youself, you dont need the #'s so it becomes: MOVE.W 0(A0,D0),D2 MOVE.W 0(A0,D0),d3 Come to think of it you dont need the 0 before the brackets. Hope this helps. -- *********/// O O **A member of S.H.I.T. (Super High Intelegence Team)**///*** * /// u Fight, defeat and kill organized laming. /// * * \\\ /// --- Zaphod (TCC) csg019@uk.ac.cov.cck ok? \\\ /// * ****\\X//**********************************************************\\X//******
jcs@crash.cts.com (John Schultz) (01/13/91)
In <1133@tekig7.MAP.TEK.COM> phils@tekig5.PEN.TEK.COM (Philip E Staub) writes: > 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 move.w (An,Dn),Dn will assemble to move.w 0(An,Dn),Dn (Still costing 14 68000 cycles). John