[英]68k ASM addressing modes
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). 我在大学学习了68k / Coldfire,并且难以理解更复杂的寻址模式(数字靠近取消引用的括号)。
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. 正如lea指令的名称所暗示的那样,它用于将地址加载到地址寄存器中。 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.
我尚未检查这些说明是否有效,我的68k技能现在还很生锈,所以我认为它们是有效的。 Not specifying the index register width in A2 introduces ambiguity.
不指定A2中的索引寄存器宽度会引起歧义。 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.
从我的头顶开始,我无法回忆起.W或.L是此处的默认寄存器宽度,因此指定它可能是一个好主意。
Ad move instructions: 广告移动说明:
For completeness, the addressing modes are: 为了完整起见,寻址模式为:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.