home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!nsd20463
- From: nsd20463@uxa.cso.uiuc.edu (Nicolas S. Dade)
- Subject: Re: problem with movea.l
- References: <1992Aug13.123046.12142@lri.fr> <1992Aug20.024321.15245@ccsd.uts.EDU.AU> <1992Aug24.040709.6491@panix.com>
- Message-ID: <BtLKC8.H7I@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Wed, 26 Aug 1992 15:28:54 GMT
- Lines: 47
-
- jwp@panix.com (JongWoo Park) writes:
-
- >In <1992Aug20.024321.15245@ccsd.uts.EDU.AU> eugene@uts.EDU.AU (R Rosen) writes:
-
- >>jpr@sun4.lri.fr (Jean-Pierre Riviere) writes:
-
- >>>Do you know of an assembler which would allow me
- >>>to have a move and not a movea when the destination
- >>>is an address register ?
- >>>I can't do that neither with a8k nor Ncode.
-
- >> No assembler will allow you to do that simply because the
- >>move command doesn't allow the destination to be address register.
- >>Its not assembler it's the hardware restriction. You just have to
- >>live with it.
-
- >Huh? movea is just an instance of more general move instruction.
- >I think most commercial assembler will "convert"
- > move <something>,An
-
- >to
-
- > movea <something>,An
-
- >One exception: you can not move a byte size operand to an address
- >register.
-
- RTFMC68000M. (though maybe that should be GAFMC68000M for some of you)
- The move instruction cannot take an address register as
- a destination. If you want to move something into an address register
- you are going to have to use the movea instruction.
- There are two differences between move and movea:
- 1) movea only allows word and longword sized data, and if the data is
- word sized it is sign-extended to a longword and the entire longword
- is placed in the address register.
- move allows byte sized moves also, and never sign extends anything
- nor changes more of a destination register than the size of the
- data.
- I.e. move.w #1,d0 does not change the upper word of register d0,
- while movea.w #1,a0 would clear it.
- 2) movea does not change the condition codes, while move does. (the
- same goes for all the instruction which deal with addresses and/or
- address registers, except cmpa, which would be much less usefull
- if it didn't :) adda, addq to an, lea, link, movea, movem, pea, suba,
- subq to an, and unlk all don't change the ccr.
-
- -Nicolas Dade
-