AIFeed

x86 是一台八进制机器

Translation(model translation, not the source's own text)
# 来源:http://geocities.com/SiliconValley/heights/7052/opcode.txt
发件人:[email protected](Mark Hopkins)
新闻组:alt.lang.asm
主题:80486 操作码与指令摘要
(1) 80x86 是一台八进制机器
本文是对 7-5-92 在 alt.lang.asm 上发布的关于 80x86 指令编码的文章的跟进与修订。
理解 80x86 编码的唯一正确方式是认识到所有 80x86
操作码都是以八进制编码的。一个字节有 3 个八进制数字,范围从 000 到
377。事实上,每个八进制组(000-077、100-177 等)倾向于编码一
类特定的操作。所有这些都是从 8080/8085/Z80 继承来的特性。
不知为何,所有人全都忽略了这一切,甚至包括编写 8086(乃至 8080)
参考手册的 Intel 人员。下面简要概述的操作码方案从 80386 开始
扩展,但与此处的整体方案保持一致。
作为了解其运作方式的例子,八进制下的 mov 指令为:
210 xrm mov Eb, Rb
211 xrm mov Ew, Rw
212 xrm mov Rb, Eb
213 xrm mov Rw, Ew
214 xsm mov Ew, SR
216 xsm mov SR, Ew
八进制数字(x、m、r、s)的含义及其与
操作数(Eb、Ew、Rb、Rw、SR)的对应关系如下:
数字 r(0-7)按如下方式编码寄存器操作数:
寄存器 (r):0 1 2 3 4 5 6 7
Rb = 字节大小寄存器 AL CL DL BL AH CH DL BH
Rw = 字大小寄存器 AX CX DX BX SP BP SI DI
段寄存器数字 s(0-7)按如下方式编码段寄存器:
段寄存器 (s):0 1 2 3 4 5 6 7

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by Lobsters
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗