寄存器间接寻址
我想知道:
MOV [BX] + 20, AX
和
MOV [BX + 20], AX
我的推理是,对于第一种情况,我们将 AX + 20
的值移动到地址 BX
对于第二种情况,我们将 AX
的值移至地址 BX+ 20
谢谢。
I would like to know if there is a difference between:
MOV [BX] + 20, AX
and
MOV [BX + 20], AX
My reasoning is that for the 1st case, we move the value of AX + 20
into the address BX
And for the 2nd case, we move the value of AX
into the address BX+ 20
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一些汇编编译器允许这两种组合。
然而,调试器应该给你正确的答案!
Some assembler compilers allow both combinations.
However, the debugger should give you right answer!
你对第一种情况的推理是错误的。这不是一个有效的构造(除非您定义了一个宏将其转换为 2 条指令)。您不能将值 ADD 粘贴在 MOV 中间。您只能使用地址的立即偏移量(第二种情况)。
Your reasoning on the first case is wrong. That's not a valid construct (unless you have a macro defined to turn it into 2 instructions). You can't stick a value ADD in the middle of a MOV. You can only use the immediate offset to the address (second case).