GDT HELP

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
beyondsociety

GDT HELP

Post by beyondsociety »

I have added a offset to the beginning of my kernel code. I have added this whole offset to the GDTR base address and the far jump to protected mode.

Do I also have to add this offset to the loading in of the GDTR?

ex: lgdt [GDTR + offset]
drizzt

Re:GDT HELP

Post by drizzt »

No if you have added the [org old_org+offset] directive to the beginning of your code...
beyondsociety

Re:GDT HELP

Post by beyondsociety »

Whats the [org old_org + offset] drizzt?
drizzt

Re:GDT HELP

Post by drizzt »

If your previous beginning address was for example 0x10000 and you add an offset 0x600, you write:

[org 0x10000+0x600]

In this case you do not have to specify GDTR + offset
Post Reply