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

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!cmcl2!panix!jwp
  3. From: uupsi!njin!pdaxs.techbook.com!jmichael (Jesse Michael)
  4. Subject: Re: problem with movea.l
  5. Sender: jwp@panix.com (JongWoo Park)
  6. Message-ID: <1992Aug28.024446.2322@panix.com>
  7. Date: Mon, 24 Aug 1992 10:24:41 GMT
  8. Organization: Portland Public Access sponsored by TECHbooks Bookstore
  9. Lines: 72
  10.  
  11. > Huh?  movea is just an instance of more general move instruction.
  12. > I think most commercial assembler will "convert"      
  13. >        move <something>,An
  14. > to 
  15. >        movea <something>,An
  16.  
  17. Actually, a move <something>,An _is_ a movea <something>,An.
  18.  
  19. Here's the coding for a move.l <something>,<somethingelse>
  20.  
  21. %0010 xxx xxx xxx xxx
  22.  ^    ^   ^   ^   ^
  23.  |    |   |   |   |
  24.  |    |   |   |   source register
  25.  |    |   |   source mode
  26.  |    |   destination mode
  27.  |    destination register
  28.  opcode
  29.  
  30. Here are the modes and register values--
  31. Addressing mode                      mode    register    syntax
  32. Data reg. direct                      000    (number)      Dn
  33. Address reg. direct                   001    (number)      An
  34. Address reg. indirect                 010    (number)     (An)
  35. Address reg. indirect w/ postincre.   011    (number)     (An)+
  36. Address reg. indirect w/ predecrem.   100    (number)    -(An)
  37. Address reg. indirect w/ displacem.   101    (number)    d(An)
  38. Address reg. indirect w/ index        110    (number)    d(An,Xi)
  39. Absolute short address                111      000        xxx.W
  40. Absolute long address                 111      001        xxx.L
  41. Program conter w/ displacement        111      010       d(PC)
  42. Program conter w/ index               111      011       d(PC,Xi)
  43. Immediate data                        111      100       #xxx
  44. Status register                       111      100      SR or CCR
  45.  
  46. * Immediate data may only be used for a source operand, and the status 
  47. register may only be used for a destination operand.
  48.  
  49. Using those, here is a move.l (a5)+,a0
  50.  
  51. %0010 000 001 011 101
  52.  
  53. And here's the coding for a movea.l  <something>,An
  54.  
  55. %0010 xxx 001 xxx xxx
  56.                   reg
  57.               mode
  58.          mode
  59.       reg
  60. opcode
  61.  
  62. The only difference is that a movea must move to a address register. (and 
  63. movea.b is illegal)
  64.  
  65. Since I've started writing a disassembler, I've become more interested in 
  66. this stuff...  :)
  67.  
  68. I don't have write access to usenet yet, or I would have posted this in 
  69. the newsgroup instead of mail...  Oh well.
  70.  
  71. -Jesse
  72.  
  73. ---
  74. jmichael@pdaxs.techbook.com (Jesse Michael) (Public Access User)
  75. pdaxs gives free access to news & mail. (503) 644-8135 - 1200/2400, N81  
  76. Send to info@techbook.com for more information.
  77. Public access users are <NOT> affiliated with TECHbooks.  
  78.  
  79.  
  80.