GDT problem: brans kernel
Posted: Sun Oct 23, 2005 3:06 pm
i have a problem in bran's kernel tutorial on osdever.net. i am sorry if it has been posted earlier but i was unable search the desired links despite several tries.
my problem is in the GDT code :-
global _gdt_flush
extern _gp
_gdt_flush:
lgdt [_gp]
mov ax, 0x10 ; here is my problem
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
jmp 0x08:flush2
flush2:
ret
the tutorial says that 0x10 is the offset of the data segment in the GDT. i just want to know how this offset is calculated.
the question may sound stupid but please help me as i am new to kernel development.
thanks in advance for all help.
my problem is in the GDT code :-
global _gdt_flush
extern _gp
_gdt_flush:
lgdt [_gp]
mov ax, 0x10 ; here is my problem
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
jmp 0x08:flush2
flush2:
ret
the tutorial says that 0x10 is the offset of the data segment in the GDT. i just want to know how this offset is calculated.
the question may sound stupid but please help me as i am new to kernel development.
thanks in advance for all help.