flat assembler
Message board for the users of flat assembler.

flat assembler > OS Construction > Protected Mode addressing

Author
Thread Post new topic Reply to topic
saltmakrell



Joined: 10 Feb 2004
Posts: 6
Location: Norway
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!

Ruben
Post 19 Mar 2004, 22:58
View user's profile Send private message MSN Messenger Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
Yes i guess everyone knows that Wink

In protected mode segment registers transform into SELECTORS and that "8" is a selector Rolling Eyes

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 Wink 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."
Post 20 Mar 2004, 06:20
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.