Hi everybody,
my os boots with GRUB. It sets up a GDT and descriptors for code, data and stack. I'm now trying to install my own GDT somewhere else and switch to this one. But I found out, that I can't load the CS register. Even if I do nothing else as
mov ax, cs
mov cs, ax
in the code direct after the multi boot header, bochs terminates with the message:
[CPU ] load_seg_reg(): invalid segment register passed!
so do anybody know what's wrong here? Can't I load the CS with the same descriptor it currently points to?
Thanks for every help!
can't load CS
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
RE:can't load CS
you can't load CS just like that.
try to do something like this "jmp LIN_COD_SEL:my_new_gdt"
try to do something like this "jmp LIN_COD_SEL:my_new_gdt"