I learned some 68k/Coldfire at the Uni, and having difficult understanding the more complex addressing modes (with the numbers near the parentheses of dereference).
I think example are the best here:
A) lea:
A1) lea $5(a1,a2.l), a0
A2) lea -1(a1,a2), a0
B) move:
B1) move.b 1(a1),d0
B2) move.b -2(a1),d0
Could anyone please explain me in plain words what happends in each instruction?
Please elaborate more if needed (pre/post incrementations, etc.).
Thanks!! ;)
Ad lea instructions:
As the name of the lea instructions implies, it is used to load an address into an address register. It will not move data from indirect addressing. I haven't checked if those instructions are valid and my 68k skills are quite rusty now, so I assume they are. Not specifying the index register width in A2 introduces ambiguity. From the top of my head I cannot recollect if .W or .L was the default register width here, so specifying that might be a good idea.
Ad move instructions:
For completeness, the addressing modes are: