Category:68000 Assembly: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) |
||
Line 40: | Line 40: | ||
MOVE.L D2,(A5) ;store the contents of D2 into the memory address pointed to by A5.</lang> |
MOVE.L D2,(A5) ;store the contents of D2 into the memory address pointed to by A5.</lang> |
||
Note that it's also possible to transfer values to/from memory directly, without involving address registers at all. For constant memory locations, this is fine. However, the real strength of the address registers is in their pre-decrement and post-increment modes, which constant memory locations cannot use. |
|||
<lang 68000devpac>MOVE.L ($00FF0000),D0 |
|||
MOVE.W D1,($00FFFFFE) |
|||
MOVE.W ($00FF0000),($00FF1000)</lang> |
|||
The use of parentheses is not required on most assemblers, but can be used as a reminder to someone reading your code that these represent the values stored at the specified memory locations rather than literal numbers. |
|||
====Post-Increment==== |
====Post-Increment==== |