>On 2001-09-17 14:14:59, j.weeks wrote:
>>On 2001-09-17 00:03:44, NANOSAURUS wrote:
>>Hey...
>>I have completed writing a kernel for my OS. How do
>>I set up the Interupt Vector/Descriptor Table(s) so
>>I can use my own interups, if anyone has a tut or can
>>just tell me how to do it. Any help is GREATLY Appreciated
>>thanks in advance
>
>Same as in C, really. Just create an array of
>structures of an IDT entry and fill 'em in.
>
>I actually just hard code most of my idt values,
>and have a couple c routines to read/write to the
>idt as needed.
>
>j.weeks
I found out where its at in memory, I just cant seem to
set it up properly. my code to initialize my interupt follows:
mov AX, 1500h ; Segment to kernel = 1500h
xor BX, BX
mov FS, BX
cli
mov [FS:21h*4],ax
sti
im using NASM and yes I know int 21h is an MSDOS interupt
but im using it for now. It compiles fine and when i run
the program it just keeps restarting my system. If you
could answer why its doing this so i can better understand
the IVT a bit more i would greatly appreciate it.
Thanks in advance...NANOSAURUS
|