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.
hi
could anyone tell me how to jump GDT segments and how?
because i would like to jump to a different GDT segment when i switch to long mode. my GDT is the one from this tutorial whith an extra GDT segment for long mode
.................................. um what should i put here .............................?..........................................
..... ................
i mean a code segment and the bellow code dose not work assemble
also i din`t know u could give segments names the compiler regonized
prehaps i have misuderstood GDT?
i thought that when you change segmants it protects it from other segments?
.................................. um what should i put here .............................?..........................................
..... ................
HJED wrote:i mean a code segment and the bellow code dose not work assemble
also i din`t know u could give segments names the compiler regonized
prehaps i have misuderstood GDT?
i thought that when you change segmants it protects it from other segments?
You specify the segment descriptor index.
For instance, if you wanted to jump to the segment specified by descriptor 3: jmp 0x18:<offset>
This is because a descriptor is 8 bytes long so 3*8 = 24 == 0x18 in hex.
And remember to use the correct RPL (requested privilege level) when using segment selectors. That's the last 2 bits of the number. Check the intel manuals.
If you're using AT&T syntax btw, the code looks a little more something like this (Although im pretty sure the syntax is wrong somewhere, I don't use it!)
.................................. um what should i put here .............................?..........................................
..... ................