MOVE.W OTHER,D3
The last two examples are quite common with programmers but real assemblers always translate "absolute long" to a PC-relative mode. (relocability problems).
Eg. MOVE.W D3,D4 copies register D3 into register D4
Eg. MOVE.L A3,D4copies A3 into D4. Does not access memory.
Eg. MOVE.L #$A56C20,D3 copies $00A56C20 into D3 whereas MOVE.L $A56C20,D3 copies contents of memory at A56C20 into D3 MOVE.W JUNK,D3 copies contents of memory at JUNK into D3 whereas MOVE.W #JUNK,D3 copies address JUNK into D3In a real system the last instruction would not be allowed due to relocatibility problems. It works fine on the Simulator but use
LEA JUNK,D3
(Ai) or (Ai)+ or -(Ai)(Ai)+ increments Ai by the size of DATA after using the address
Eg.
Suppose A5 contains 00ABCDE0
Suppose memory is address content
ABCDDE 0000
ABCDE0 1234
ABCDE2 5678
then
MOVE.W (A5),D3 moves 1234 into D3.W
MOVE.W (A5)+,D4 moves 1234 into D4.W, then increments A5 by 2
MOVE.W (A5)+,D6 moves 5678 into D6.W, then increments A5 by 2
MOVE.W -(A5),D3 decrements A5 by 2, then moves 5678 into D3
MOVE.W -(A5),D4 decrements A5 by 2, then moves 1234 into D4
MOVE.W -(A5),D2 decrements A5 by 2, then moves 0000 into D2
Eg. If A3 contains $00ABC000 then MOVE.W $0F3(A3),D3 will copy the word at address $00ABC0F3 into D3.W MOVE.L -1(A3),D1 will copy the long at address $00ABBFFF into D1.LIt is used for many data structures like structures and records. It is used for accessing portions of any block of memory whose location (first byte) is stored in a register. It is used a lot.
Note that this gives access to memory + or - 32K from an address in An. This is the reason for many 32K byte limits on blocks of data. Eg. local variables in THINK Pascal.
Only the above modes are allowed. All operands must have a syntax which EXACTLY matches one of these modes. The "Ai", "Di", and "const" values must be exactly that. They are not general-purpose "expressions" as used in high-level languages.
move.w 47(A3),D4 ;OK move.w 47(D3),D3 ;no such mode - invalid move.w D3(A3),D2 ;no such mode - invalid move.w (A4+3),D1 ;no such mode - invalid move.w 3+2(A4),D0 ;OK because "3+2" is still a "constant"