【译】x86程序员手册01
Intel 80386 Reference Programmer's Manual
80386程序员参考手册
Chapter 1 -- Introduction to the 80386
第1章 - 80386的介绍
The 80386 is an advanced 32-bit microprocessor optimized for multitasking operating systems and designed for applications needing very high performance. The 32-bit registers and data paths support 32-bit addresses and data types. The processor can address up to four gigabytes of physical memory and 64 terabytes (2^(46) bytes) of virtual memory. The on-chip memory-management facilities include address translation registers, advanced multitasking hardware, a protection mechanism, and paged virtual memory. Special debugging registers provide data and code breakpoints even in ROM-based software.
80386是一个为多任务操作系统优化的为高效程序设计的32位微处理器。32位的寄存器和数据通道支持32位地址和数据类型。处理器可以寻址高达4G的物理内在和64M的虚拟内存。芯片上的内存管理设备包括地址转换寄存器,高效的多任务硬件,保护机制以及分页的虚拟内存。额外提供的调试寄存器使即使在ROM中的程序也可以对数据和代码进行断点调试。
1.1 Organization of This Manual
手册的组织
This book presents the architecture of the 80386 in five parts:
本书将80386的架构分为以下5个部分:
- Part I -- Applications Programming 程序设计
- Part II -- Systems Programming 系统程序
- Part III -- Compatibility 兼容性
- Part IV -- Instruction Set 指令集
- Appendices 附录
These divisions are determined in part by the architecture itself and in part by the different ways the book will be used. As the following table indicates, the latter two parts are intended as reference material for programmers actually engaged in the process of developing software for the 80386. The first three parts are explanatory, showing the purpose of architectural features, developing terminology and concepts, and describing instructions as they relate to specific purposes or to specific architectural features.
这种分法是架构本身决定的,本书对每个部分使用不同的方式进行讲述。正如下面的表格所示,后两部分是热衷在80386上进程开发的人员在进行程序设计时的参考资料。前三部分是对架构特性、开发规则和概念以及对指令集的设计目的和特定的架构特性等进行解释。
Explanation 解释说明
Reference 参考资料
The first three parts follow the execution modes and protection features of the 80386 CPU. The distinction between applications features and systems features is determined by the protection mechanism of the 80386. One purpose of protection is to prevent applications from interfering with the operating system; therefore, the processor makes certain registers and instructions inaccessible to applications programs. The features discussed in Part I are those that are accessible to applications; the features in Part II are available only to systems software that has been given special privileges or in unprotected systems.
前三部分解释80386CPU的执行模式和保护特性。程序特性和系统特性的区别取决于80386的保护机制。保护机制的一个目的是阻止应用程序干扰操作系统;这样处理器可以确保寄存器和指令对应用程序是透明的。第一部分讨论的特性对应用程序是可访问的;第二部分讨论的特性仅对具有特权的操作系统或在非保护模式下的系统有效。
The processing mode of the 80386 also determines the features that are accessible. The 80386 has three processing modes:
80386的进程模式也决定这些特性是有效的。80386有三种进程模式:
- Protected Mode. 保护模式
- Real-Address Mode. 实地址模式
- Virtual 8086 Mode. 虚拟80086模式
Protected mode is the natural 32-bit environment of the 80386 processor. In this mode all instructions and features are available.
保护模式是80386处理器的自有的32位环境。在这个模式下,所有指令和特性都是有效的可以使用的。
Real-address mode (often called just "real mode") is the mode of the processor immediately after RESET. In real mode the 80386 appears to programmers as a fast 8086 with some new instructions. Most applications of the 80386 will use real mode for initialization only.
实地址模式(通常被称做实模式)是处理器在启动后立即进入的模式。在实模式下,对于程序来说80386就象一个具有新指令集的更快的8086。大部分的80386程序仅在初始化时使用实模式。
Virtual 8086 mode (also called V86 mode) is a dynamic mode in the sense that the processor can switch repeatedly and rapidly between V86 mode and protected mode. The CPU enters V86 mode from protected mode to execute an 8086 program, then leaves V86 mode and enters protected mode to continue executing a native 80386 program.
虚拟的8086模式(也叫V86模式)是一种动态的模式,处理器可以在V86模式各保护模式之间进行快速和重复的切换。CPU从保护模式进入V86模式来执行8086程序,然后切换进入保护模式来继续执行80386的程序。
The features that are available to applications programs in protected mode and to all programs in V86 mode are the same. These features form the content of Part I. The additional features that are available to systems software in protected mode form Part II. Part III explains real-address mode and V86 mode, as well as how to execute a mix of 32-bit and 16-bit programs.
这个特性对于保护模式下的应用程序和所有的V86模式的程序都是一样可以使用的。这些特性构成了第一部分的内容。第二部分额外的特性仅对保护模式下的系统应用有效。第三部分解释实模式和V86模式,同时也对如何执行一个混合的32位和16位程序进行说明。
Available in All Modes 所有模式均有效
Part I -- Applications Programming 应用程序
Available in Protected Mode Only 仅保护模式有效
Part II -- Systems Programming 系统应用
Compatibility Modes 兼容模式
1.1.1 Part I -- Applications Programming 应用程序
This part presents those aspects of the architecture that are customarily used by applications programmers.
这部分所展示的架构方面的内容均可以被应用程序使用。
【译】x86程序员手册01的更多相关文章
- 【译】x86程序员手册03 - 2.1内存组织和分段
2.1 Memory Organization and Segmentation 内存组织和分段 The physical memory of an 80386 system is organized ...
- 【译】x86程序员手册00 - 翻译起因
从上一次学习MIT的操作系统课程又过去了一年.上次学习并没有坚持下去.想来虽有种种原因,其还在自身无法坚持罢了.故此次再鼓起勇气重新学习,发现课程都已由2014改版为2016了.但大部分内容并没有改变 ...
- 【译】x86程序员手册38-10.2实在址模式下的软件初始化
10.2 Software Initialization for Real-Address Mode 实地址模式的软件初始化 In real-address mode a few structur ...
- 【译】x86程序员手册09-第3章程序指令集
注:觉得本章内容与理解操作系统不直接相关,所以本章并未看完,也就没有翻译完,放在这里中是为了保证手册的完整.有兴趣的人可以去原址查看. https://pdos.csail.mit.edu/6.828 ...
- 【译】x86程序员手册02 - 基本的程序模式
Chapter 2 -- Basic Programming Model: 基本的程序模式 Introduces the models of memory organization. Defines ...
- 【译】x86程序员手册40-10.5初始化的例子
10.5 Initialization Example初始化的例子 译注:本来想把这个例子全部注释完,但由于对intel汇编实不熟悉,有太多的伪指令,本人也是免强看懂,所以就不再做翻译了. $TITL ...
- 【译】x86程序员手册39-10.3切换到保护模式
10.3 Switching to Protected Mode 切换到保护模式 Setting the PE bit of the MSW in CR0 causes the 80386 to b ...
- 【译】x86程序员手册37-第10章 初始化
Chapter 10 Initialization 第10章 初始化 After a signal on the RESET pin, certain registers of the 80386 a ...
- 【译】x86程序员手册35-9.8异常条件
译注:一些异常没有翻译,因为看书时主要为了理解linux代码,所以代码中没有主要使用的就没有仔细看.这部分内容后期再看时再进行翻译. 9.8 Exception Conditions 异常条件 The ...
随机推荐
- 29、Java并发性和多线程-非阻塞算法
以下内容转自http://ifeve.com/non-blocking-algorithms/: 在并发上下文中,非阻塞算法是一种允许线程在阻塞其他线程的情况下访问共享状态的算法.在绝大多数项目中,在 ...
- 人人都是 DBA
http://www.cnblogs.com/gaochundong/tag/DBA/
- 阿里云nginx创建多站点
最近开始用阿里云的vps,用了它的一键安装包安装了php环境,nginx的.下面记录创建多站点的心得. 首先php安装好后会自带安装一个phpwind的站点. 文件目录存放在 /alidata/www ...
- 开源软件Review Board
开源软件, Review Board 代码审查的. https://www.reviewboard.org/
- Android:Unable to resolve target ‘android-8’问题解决
在学习过程中,下载别人写过的代码,导入到eclipse,报错: Unable to resolve target 'android-8' 问题是项目版本号问题. 解决方法例如以下: 右击项目:Prop ...
- Oracle 简单的列转行
需求是,统计每一个部门不同工种的薪水总和. SQL> select deptno,ename,job,sal from emp; DEPTNO ENAME JOB ...
- 转 java面试题
● 简述synchronized?Object:Monitor机制: ● 简述happen-before规则 : ● JUC和Object : Monitor机制区别是什么 : 简述AQS原理 : ● ...
- 在SAE搭建Python+Django+MySQL(基于Windows)
为了与时俱进,工作闲余開始研究Python,刚一接触就被Python这"优雅"的语法吸引住.后来接触到了Django.尽管还没有太深入的研究.但对这样的新概念的WEB开发非常感兴趣 ...
- POJ 2367:Genealogical tree(拓扑排序)
Genealogical tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2738 Accepted: 1838 Spe ...
- 【Spark】Stage生成和Stage源代码浅析
引入 上一篇文章<DAGScheduler源代码浅析>中,介绍了handleJobSubmitted函数,它作为生成finalStage的重要函数存在.这一篇文章中,我将就DAGSched ...