home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12715 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.4 KB  |  59 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. 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
  3. From: nsd20463@uxa.cso.uiuc.edu (Nicolas S. Dade)
  4. Subject: Re: problem with movea.l
  5. References: <1992Aug13.123046.12142@lri.fr> <1992Aug20.024321.15245@ccsd.uts.EDU.AU> <1992Aug24.040709.6491@panix.com>
  6. Message-ID: <BtLKC8.H7I@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Wed, 26 Aug 1992 15:28:54 GMT
  10. Lines: 47
  11.  
  12. jwp@panix.com (JongWoo Park) writes:
  13.  
  14. >In <1992Aug20.024321.15245@ccsd.uts.EDU.AU> eugene@uts.EDU.AU (R Rosen) writes:
  15.  
  16. >>jpr@sun4.lri.fr (Jean-Pierre Riviere) writes:
  17.  
  18. >>>Do you know of an assembler which would allow me
  19. >>>to have a move and not a movea when the destination
  20. >>>is an address register ?
  21. >>>I can't do that neither with a8k nor Ncode.
  22.  
  23. >>    No assembler will allow you to do that simply because the
  24. >>move command doesn't allow the destination to be address register.
  25. >>Its not assembler it's the hardware restriction. You just have to
  26. >>live with it.
  27.  
  28. >Huh?  movea is just an instance of more general move instruction.
  29. >I think most commercial assembler will "convert"      
  30. >       move <something>,An
  31.  
  32. >to 
  33.  
  34. >       movea <something>,An
  35.  
  36. >One exception: you can not move a byte size operand to an address 
  37. >register.
  38.  
  39. RTFMC68000M. (though maybe that should be GAFMC68000M for some of you)
  40. The move instruction cannot take an address register as
  41. a destination. If you want to move something into an address register
  42. you are going to have to use the movea instruction.
  43. There are two differences between move and movea:
  44. 1) movea only allows word and longword sized data, and if the data is
  45.    word sized it is sign-extended to a longword and the entire longword
  46.    is placed in the address register.
  47.    move allows byte sized moves also, and never sign extends anything
  48.    nor changes more of a destination register than the size of the
  49.    data. 
  50.    I.e. move.w #1,d0 does not change the upper word of register d0,
  51.    while movea.w #1,a0 would clear it.
  52. 2) movea does not change the condition codes, while move does. (the
  53.    same goes for all the instruction which deal with addresses and/or
  54.    address registers, except cmpa, which would be much less usefull
  55.    if it didn't :) adda, addq to an, lea, link, movea, movem, pea, suba,
  56.    subq to an, and unlk all don't change the ccr.
  57.  
  58. -Nicolas Dade
  59.