Registers in x86 architecture

[Excerpted from the book:<The Linux Kernel Primer>.] 

   The x86 architecture is a Complex Instruction Set Computing(CISC) architecture. Instructions are variable length,depending on their function.Three kinds of registers exist in the Pentuim class x86 architecture: general pupose,segment,and status/control. The basic user set is as follows:
* EAX:  General purpose accumulator
* EBX:  Pointer to data
* ECX:  Counter for loop operations
* EDX:  I/O pointer
* ESI:   Pointer to data in DS segment
* EDI:   Ponter to data in ES segment
* ESP:   Stack pointer
* EBP:  Pointer to data on the stack
   These six segment registers are used in real mode addressing where memory is accessed in blocks.A given byte of memory is then referenced by an offset from this segment(for example,ES:EDI references memory in the ES with an offset of the value in EDI):
* CS:  Code segment
* SS:  Stack segment
* ES,DS,FS,GS: Data segment
   The EFLAGS register indicates processor status after each intruction. This can hold results such as zero,overflow,or carry.The EIP is a dedicated pointer register that indicates an offset to the current instruction to the processor.This is generally used with the code segment register to form a complete address(for example, CS:EIP):
EFLAGS: Status,control,and system flags
EIP: The instruction pointer, contains an offset from CS

posted on 2008-05-05 17:14 挑灯看剑 阅读(345) 评论(0)  编辑 收藏 引用 所属分类: 汇编艺术

只有注册用户登录后才能发表评论。
<2008年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

导航

公告

【自我介绍】 08年南开大学硕士毕业 最近关注:算法、Linux、c++、高并发 爱好:滑旱冰、打乒乓球、台球、保龄球

常用链接

随笔分类(139)

文章分类

我常去的网站

技术博客(都是大牛)

技术站点

搜索

积分与排名