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