苏打草莓对《The Intel Microprocessors》的笔记(2)

苏打草莓
苏打草莓 (正式闭关准备GT)

读过 The Intel Microprocessors

The Intel Microprocessors
  • 书名: The Intel Microprocessors
  • 作者: Barry B. Brey
  • 页数: 944
  • 出版社: Prentice Hall
  • 出版年: 2008-6-28
  • 第78页 Addressing modes

    opcode: operation code.操作码,如MOV comma:逗号 memory:存储器,即内存,挂在数据总线上, register:寄存器,在CPU里 cache:缓存,分一级和二级,集成在CPU里,常用数据的保存,解决内存读取的慢速问题 instruction:指令 addressing:寻址 word-sized:一字节长的 8086,80186,80286:16位CPU芯片 80386,80486,80586(Pentium):32位芯片 Pentium 4,Core2:可以支持64位CPU,也有32位 assemblers:汇编程序 通用寄存器(8个,16位): AX Accumulator 累加器(其中AH, AL是其中的高8位和低8位,在8086等8位CPU中,EAX则是32位CPU寄存器,是AX作为低16位的扩展,如在32位CPU中用:MOV AX, BX指令不影响高16位) BX Base Register 基址寄存器 CX Count Register 计数寄存器 DX Data Register 数据寄存器 SP Stack Pointer 堆栈指针 BP Base Pointer 基址指针 SI Source Index Register 源变址寄存器 DI Destination Index Register 目的变址寄存器 2)控制寄存器(2个): IP Instruction Pointer 指令指针 FLAGS Flags Register 标志寄存器 3)段寄存器(4个): CS Code Segment Register 代码段寄存器 DS Data Segment Register 数据段寄存器 ES Extra Segment Register 附加段寄存器 SS Stack Segment Register 堆栈段寄存器

    2013-11-17 19:47:01 回应
  • 第88页 Register Indirect Addressing
    Register indirect addressing allows data to be addressed at any memory location through an offset address held in any of the following registers: BP, BX, DI, and SI. For example, if register BX con- tains 1000H and the MOV AX,[BX] instruction executes, the word contents of data segment offset address 1000H are copied into register AX. If the microprocessor is operated in the real mode and DS = 0100H, this instruction addresses a word stored at memory bytes 2000H and 2001H, and transfers it into register AX
    引自 Register Indirect Addressing

    BX中存储偏移量,通过寄存器间接寻址把数据段复制到AX中。

    Register Indirect Addressing

    实模式下地址的计算是,如果DS=0100H作为基址,则绝对地址就应该是 0100H*10H+1000H(BX)=1000H+1000H=2000H。则提取在2000H地址的存储器中的数据段(1单位的8位数据),但是AX中有16位存储单位,所以2000H的数据段被复制到AL中,2001H的数据段被复制到AH中。

    The [ ] symbols denote indirect addressing in assembly language. In addition to using the BP, BX, DI, and SI registers to indirectly address mem- ory, the 80386 and above allow register indirect addressing with any extended register except ESP.
    引自 Register Indirect Addressing

    2013-11-17 21:22:12 回应