2.4 Instruction Format 指令格式

The information encoded in an 80386 instruction includes a specification of the operation to be performed, the type of the operands to be manipulated, and the location of these operands. If an operand is located in memory, the instruction must also select, explicitly or implicitly, which of the currently addressable segments contains the operand.

80386指令的编码信息包括操作如何进行的说明,操作数类型,操作数的位置。如果一个操作数在内存中,指令必须明确或隐式地选择当前包含操作数的可编址段。

80386 instructions are composed of various elements and have various formats. The exact format of instructions is shown in Appendix B; the elements of instructions are described below. Of these instruction elements, only one, the opcode, is always present. The other elements may or may not be present, depending on the particular operation involved and on the location and type of the operands. The elements of an instruction, in order of occurrence are as follows:

80386的指令由可变元素组成,并且有多种格式。准确的指令格式被列在附录B中;指令的元素在下面说明。在这些指令元素中,只有一个元素,即opcode,就必须存在项。其他的元素可以有也可以没有,这依赖于特定的操作和操作数类型的位置。这些元素,按出现的顺序列在下面:

  • Prefixes -- one or more bytes preceding an instruction that modify the operation of the instruction. The following types of prefixes can be used by applications programs:

前缀 —— 一个或多个字节出现在指令中,修改指令操作。下面列出的前缀类型可以在应用程序中使用:

  1. Segment override -- explicitly specifies which segment register an instruction should use, thereby overriding the default segment-register selection used by the 80386 for that instruction.

段覆盖 —— 明确指定该指令使用哪个段寄存器,因此会覆盖掉80386为这些指令选择的默认寄存器。

  1. Address size -- switches between 32-bit and 16-bit address generation.

地址大小 —— 32位和16位地址开关

  1. Operand size -- switches between 32-bit and 16-bit operands.

操作数大小 —— 32位和16位操作数开关

  1. Repeat -- used with a string instruction to cause the instruction to act on each element of the string.

重复 —— 在字符串指令中使用,指示指令在字符串的每个元素中使用。

  • Opcode -- specifies the operation performed by the instruction. Some operations have several different opcodes, each specifying a different variant of the operation.

操作符 —— 指定指令的操作。一些操作有多个不同的操作符,每一个指定不同的可变的操作。

  • Register specifier -- an instruction may specify one or two register operands. Register specifiers may occur either in the same byte as the opcode or in the same byte as the addressing-mode specifier.

寄存器区分符 —— 一条指令可指定一个或两个寄存器操作数。寄存器区分符即可以放在一个字节中作为操作符,或者放在同一个字节中作为地址模式区分符。

  • Addressing-mode specifier -- when present, specifies whether an operand is a register or memory location; if in memory, specifies whether a displacement, a base register, an index register, and scaling are to be used.

地址模式区分符 —— 当出现时,用来区分一个操作数是在寄存器还是内存位置;如果在内存中,区分是一个置位符、基址寄存器、索引寄存器还是比例因子。

  • SIB (scale, index, base) byte -- when the addressing-mode specifier indicates that an index register will be used to compute the address of an operand, an SIB byte is included in the instruction to encode the base register, the index register, and a scaling factor.

SIB(比例,索引,基址)字节 —— 当地址模式区分符表明有一个索引寄存器被用来计算一个操作数的地址时,SIB字节也被包含在指令中,用来编码基址寄存器、索引寄存器和比例因子。

  • Displacement -- when the addressing-mode specifier indicates that a displacement will be used to compute the address of an operand, the displacement is encoded in the instruction. A displacement is a signed integer of 32, 16, or eight bits. The eight-bit form is used in the common case when the displacement is sufficiently small. The processor extends an eight-bit displacement to 16 or 32 bits, taking into account the sign.

置位符 —— 当地址模式区分符表明一个置位符被用来计算一个操作数的地址时,置位符也被编码到指令中。一个置位符是一个32、16或8位的整数。8位通常用来表示置位符相当小。处理器扩展一个8位置位符到16或者32位,包括符号。

  • Immediate operand -- when present, directly provides the value of an operand of the instruction. Immediate operands may be 8, 16, or 32 bits wide. In cases where an eight-bit immediate operand is combined in some way with a 16- or 32-bit operand, the processor automatically extends the size of the eight-bit operand, taking into account the sign.

立即数 —— 当存在时,为指令直接提供一个数值。立即数可以是8、16或32位宽度。一旦8位立即数和16位或32位操作数进行组合时,处理器自动扩展8位操作数的大小,包括符号位。

转载于:https://www.cnblogs.com/mqmelon/p/6692146.html

【译】x86程序员手册06 - 2.4指令格式相关推荐

  1. 【译】x86程序员手册37-第10章 初始化

    Chapter 10 Initialization 第10章 初始化 After a signal on the RESET pin, certain registers of the 80386 a ...

  2. 《程序员》06期最新上市:2008开源在中国

        本期封面故事:2008开源在中国   开源,已经成为当今世界软件产业无法逆转的趋势.而中国的开源运动,却处在一个尴尬境地.本期封面报道,以超过30多页的大篇幅,全面纪实开源在中国的真实状况.文 ...

  3. [译] C程序员该知道的内存知识 (4)

    续上篇: [译] C程序员该知道的内存知识 (1) [译] C程序员该知道的内存知识 (2) [译] C程序员该知道的内存知识 (3) 这是本系列的第4篇,也是最后一篇,含泪填完这个坑不容易,感谢阅读 ...

  4. Cocos2d-x程序员手册(ProgrammersGuide)v3.3 第9章:3D

    Cocos2d-x程序员手册(ProgrammersGuide)v3.3 翻译--第9章:3D 原著是英文,本文只是一个个人的简单理解的中文的非正式翻译,供自己学习使用,参考需谨慎. 向原著的作者Sl ...

  5. DOS程序员手册(四)

    5.4打印机功能 打印机是能够直接控制的输出设备之外的唯一的重要输出设备.它们的功能比屏幕 107页 功能要简单得多,因为它们只涉及字符输出,并最小程度地与打印机的输入有关. 输出给打印机的最简单的方 ...

  6. DOS程序员手册(七)

    第11章      中断处理程序 本章将深入到DOS系统内部探讨中断处理程序的内容.与其他计算机编程不一样, 中断处理程序这个名词听起来就很难懂.用最简单的话来说,中断处理程序就是对应于中 断激活的程 ...

  7. unix程序员手册_推荐几本实惠电子书,程序员读的经典书都有,比如deep learning...

    小编挑了几本大家耳熟能详的经典电子书,希望您能喜欢.四折的价格小编都用红框标注出来喽!!!祝您阅读愉快!以下推荐的9本电子书均由异步社区出品,如需要请移步https://www.epubit.com/ ...

  8. DOS程序员手册(二)

    2.6存储设备 随着DOS的升级,磁盘存储容量也有了很大扩充.表2.4介绍了软盘容量的增加以 及所支持驱动器型号的数量. 表2.4软盘容量 DOS版本 软盘 容量 1.0 5.25英寸SSDD 160 ...

  9. 【译】程序员都有的这 10 个坏习惯!

    一.休息不够 二.拒绝寻求帮助 三.停止学习 四.混乱的代码 五.工作和生活的不平衡 六.糟糕的办公室政治 七.不能从错误中吸取教训 八.太早放弃 九.做一个无所不知的人 十.不接受建设性批评 编者按 ...

最新文章

  1. 网站静态文件缓存的处理
  2. boost::kruskal_minimum_spanning_tree用法的测试程序
  3. 如何快速完成企业应用IPv6改造
  4. hadoop基本思想与概念
  5. Pytorch中expand_as()函数详解
  6. 剑指offer之数据流中的中位数
  7. 【java】创建一个顶层框架类的对象
  8. 自学it18大数据笔记-第二阶段Hive-day4——会持续更新……
  9. 计算机高特效吃鸡游戏主机配置单,畅玩主流游戏吃鸡LOL组装电脑配置清单
  10. 连点器安卓手机版_【百度识图器安卓下载】百度识图器官方app下载 v3.6.0 手机版...
  11. TotalCommander常用操作
  12. 数据科学猫:数据分析的主要类型、描述性分析、预测性分析与规范性分析
  13. 面试官没想到我对redis数据结构这么了解,直接给offer
  14. 桌面文件不见了怎么恢复
  15. css white-space属性总结
  16. 【性能定位】使用jstack定位线程堆栈信息
  17. 本科就学人工智能有意义吗?
  18. 嗨,程序员,你知道高级工程师用的搜索引擎吗?
  19. android高德地图轨迹纠偏,RoutePath-(高德地图)根据定位点绘制路线+轨迹纠偏
  20. 【VB-01】离线语音模块,无需语音算法开发,直接嵌入式用。

热门文章

  1. cocos2dx 3.0打包android遇到的错误(持续更新)
  2. Google 在开源上的贡献
  3. 双11不过瘾?双十二低至半价继续抢,更有免费学的机会等你抢!
  4. Poj(1459),最大流,EK算法
  5. 济南长清104国道科目三考试流程(转载)
  6. linux增加epel源,yum安装nignx,脚本安装mysql服务端,shell脚本监控网站页面
  7. 无法安装声卡及MODEM驱动
  8. SAP 主数据-地点表
  9. WebKit Page对象的分析
  10. Sysnoise5.6安装教程