GDT Tutorial: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m Corrected label name
Fixed base and limit values to 4 MiB
Line 61:
<source lang="c">
GDT[0] = {.base=0, .limit=0, .type=0}; // Selector 0x00 cannot be used
GDT[1] = {.base=0x040000000x400000, .limit=0x03ffffff0x3fffff, .type=0x9A}; // Selector 0x08 will be our code
GDT[2] = {.base=0x080000000x800000, .limit=0x03ffffff0x3fffff, .type=0x92}; // Selector 0x10 will be our data
GDT[3] = {.base=&myTss, .limit=sizeof(myTss), .type=0x89}; // You can use LTR(0x18)
</source>