Message board for the users of flat assembler.
> OS Construction > Protected Mode addressing
When I have loaded a Protected mode kernel into realmode address
0x1000:0x0000, why do I have to jmp to "pword 0x0008:0x10000", and not
to 0x1000:0x0000? Where does the "8" come from??
I hope that anyone can answer this stupid question!
|19 Mar 2004, 22:58||
Yes i guess everyone knows that
In protected mode segment registers transform into SELECTORS and that "8" is a selector
Selctors are an index into the GDT system table. The GDT table keeps the actual base addres, limits, and flags for each segment in protected mode (please check Intel docs on this)
Depending on how the selector "8" is defined in GDT the 0x10000 offset could have another value also however on a "flat" memory selector that 0x10000h is just the linear address into a 4G memory space...
"Any intelligent fool can make things bigger,
more complex, and more violent.
It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."
|20 Mar 2004, 06:20||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.