Im writing an os in pascal using Fpc as compiler
then i was following JamesMolly's tutorial about IDT & GDT
but i just cant get the idt and gdt working
in the gdt i have an error in the flush
and in the idt it just wont say that an interrupt happend, even if im calling isr0(); from kernel it wont say anything
my isr0 looks like this :
Code: Select all
procedure isr0(); assembler; [public, alias: 'isr0'];
asm
cli
push byte 0
push byte 0
jmp isr_common_stub
end;
Code: Select all
procedure gdt_flush (ptn: LongWord); assembler;
asm
mov eax, ptn
lgdt [eax]
mov ax, $10
mov ds, ax <-- Error here
mov es, ax And here and the rest of the moving of the segments
mov fs, ax
mov gs, ax
mov ss, ax
end;