是否有 x86 操作码用于将立即字节移动到直接内存位置(不使用寄存器)?
有没有办法将特定的立即字节大小的数字“移动”到直接内存位置?即
MOV 10h,ffffh
要将值16
写入内存地址65535
?如果是这样,那是哪个操作码,或者我必须先将内存地址存储到寄存器中?
Is there a way to 'mov'e a specific immediate byte-size number into a direct memory location? I.e.
MOV 10h,ffffh
to write the value 16
into the memory address 65535
? If so, which opcode is that, orwould I have to store a memory address into a register first?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。操作码是
C6
。您应该免费下载英特尔 ISA 文档的副本,这些文档免费可用。对于您的后续问题:您的示例的完整编码是:
Yes. The opcode is
C6
. You should download a copy of the Intel ISA documents, which are freely available.To your follow-up question: the full encoding of your example is:
英特尔手册第 2 卷指令集参考 - 325383-056US 2015 年 9 月 第 3.2 节“MOV—移动
" 有一个表,其中包含:
那么您必须知道:
r/m
表示寄存器或内存位置imm
表示立即数所以这些是您正在寻找的编码。
更多经验性的您也可以尝试一下并反编译:
然后:
给出:
因此我们得出结论,
c6
是操作码,带有 ModR/M05
,后面紧随其后。Intel Manual Volume 2 Instruction Set Reference - 325383-056US September 2015 Section 3.2 "MOV—Move
" has a table which contains:
Then you must know that:
r/m
means register or memory locationimm
means immediateSo those are the encodings you are looking for.
More empirically you could also have just tried it out and decompiled:
Then:
Gives:
So we conclude that
c6
is the opcode, with ModR/M05
, and immediates following.