用于立即寻址的机器代码模板

发布于 2024-10-18 23:19:44 字数 157 浏览 7 评论 0原文

立即寻址的机器代码语言是什么。

如果寄存器寻址的机器代码模板是

OPCODE(6 位) D(1 位) W(1 位) MOD(2 位) REG(3 位) R/M(3 位)

总计16 位。

我使用intel 80386 intel微处理器!

what is the machine code language for immediate addressing..

if the machine code template for register adddressing is

OPCODE(6 bits) D(1 bit) W(1 bit) MOD(2bits) REG(3bits) R/M(3bits)

total 16 bits.

m using intel 80386 intel microprocessor!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼泪也成诗 2024-10-25 23:19:44

立即数操作数的格式有一些变化。通常(可能总是)对于具有立即操作数的指令,操作码的高位为 1。 D 位被替换为 X(扩展)位。如果操作数是 8 位 (W=0),则忽略 X 位。如果操作数不是 8 位且 X=0,则立即值的大小与操作数大小相同。如果 X=1,则立即数是一个 8 位数字,它被符号扩展为当前操作数大小。接下来,REG 字段被替换为操作码扩展,该操作码扩展将根据所使用的指令而有所不同。最后,立即值以小端方式添加到指令的末尾。

有关详细信息,请参阅 http://www.c-jump.com/CIS77 /CPU/x86/lecture.html,特别是第 21 和 37 节。

There are a few changes to the format for immediate operands. Usually (possibly always) the high bit of the opcode is 1 for instructions with immediate operands. The D bit is replaced with an X (extension) bit. If the operands are 8-bit (W=0), then the X bit is ignored. If the operands are not 8-bit and X=0, then the immediate value is the same size as the operand size. If X=1, then the immediate is an 8-bit number which is sign-extended to the current operand size. Next, the REG field is replaced with an opcode extension, which will be different depending on the instruction in use. Finally, the immediate value is added to the end of the instruction, in little endian.

For more information see http://www.c-jump.com/CIS77/CPU/x86/lecture.html, specifically sections 21 and 37.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文