Home > other >  Gdt_base why is 0 0 x7c00 x7e00, rather than 0 x7e00 0 x7c00
Gdt_base why is 0 0 x7c00 x7e00, rather than 0 x7e00 0 x7c00

Time:10-13

X86 assembly language: from solid models to protect gdt_base books page 191 + 0 x7c00 why is 0 x7e00, rather than 0 x7e00 + 0 x7c00,
Gdt_base gdt_base dd is linear address 0 x00007e00; Converts logical addresses should be 0 x0000:0 x7e00, thank you.

CodePudding user response:

Haven't seen the book, but from the 7 c00 this value
This code should be the boot sector?
In theory, the GDT base should be 0, plus 7 c00 is the boot code first address in memory

CodePudding user response:

The book code is written so:

 
.
Mov ax, [cs: gdt_base + 0 x7c00]
.
Gdt_base dd 0 x00007e00
.


Complete statement to add parentheses, and then here [... : gdt_base +... The value "0 x7e00" is not representative, but store the value of offset,
The offset plus "master boot program of actual loading position is a logical address 0 x0000:0 x7c00: [cs:... + 0 x7c00] part of the cs=0 x0000",
Two address get new address set high parentheses, is the value of stored within this new address: 0 x7e00
  • Related