Lal*_*oyo 1 assembly 68000 coldfire addressing-mode
我在大学学习了68k / Coldfire,并且难以理解更复杂的寻址模式(数字位于取消引用的括号附近)。
我认为最好的例子是:
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
Run Code Online (Sandbox Code Playgroud)
谁能用简单的语言解释我,每条指令中发生了什么?
如果需要,请详细说明(增加/增加前后等)。
谢谢!!;)
小智 6
广告说明:
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: