The art of Linux kernel design learn notes (iv) default and offset registers

Source: Internet
Author: User

  reference book:"Intel microprocessors"

  Table 1 Default 16-bit segment + offset addressing combination

Paragraph Offset amount Special purpose
Cs Ip Instruction Address
Ss SP or BP Stack Address
Ds BX, DI, SI, 8-bit or 16-digit Data address
Es Di for string instructions String Destination Address

Table 2 default 32-bit segment + offset addressing combination

Paragraph Offset amount Special purpose
Cs Eip Instruction Address
Ss ESP or EBP Stack Address
Ds

EAX, EBX, ECX, EDX,

ESI, EDI, one 8-bit or 32-digit

Data address
Es EDI for string instructions String Destination Address
Fs No default value General Address
Gs No default value General Address

  SEG Command:

  The SEG directive changes the segment register in the default "segment + Offset addressing combination".

SEG CS MOV sectors, CX MOV AX, #INITSEG

SEG will only affect MOV sectors, CX (equivalent to mov cs:[sectors], CX) without affecting mov AX, #INITSEG.

The art of Linux kernel design learn notes (iv) default and offset registers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.