GDT advice
GDT advice
I have finally got my OS to boot without any triple faults. Now I was just wondering, does the GDT have to be set up before the Protected mode Jump? and would you recommend setting it up in assembler code or Pascal code??
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
- JackScott
- Member
- Posts: 1036
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
Re: GDT advice
Even if it doesn't theoretically have to (not sure about this) it's definitely a good idea to have one set up. You can build the table in either assembly or Pascal, doesn't matter. But the LGDT instruction will have to be done in assembly, obviously.
Re: GDT advice
It has to be set up before you reload any of the segment registers in protected mode. If by "protected mode jump" you mean the usual "jmp 0x08:12345678" instruction, then yes, it has to be set up before that.System123 wrote:I have finally got my OS to boot without any triple faults. Now I was just wondering, does the GDT have to be set up before the Protected mode Jump? and would you recommend setting it up in assembler code or Pascal code??
Re: GDT advice
Thanks.. I have it set up an running now.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS