Okay, I think that I have this right, your OS doesn't have sevral GDTs it has one GDT with several descriptors in it. Right?
Also, does anyone know where I can find a good example of setting up a IDT?
Thanks in advance,
K.J.
GDT, IDT
Re: GDT, IDT
>Okay, I think that I have this right, your OS doesn't have sevral GDTs it has one GDT with several descriptors in it. Right?
Right.
>Also, does anyone know where I can find a good example of setting up a IDT?
This (NASM) code sets up handlers for all 256 INTs. There are also setvect() and getvect() functions to change the handlers from C:
http://www.execpc.com/~geezer/osd/code/osd6/kstart.asm
Similar code:
http://www.execpc.com/~geezer/osd/intr/x86-32.zip
In the current version of my Cosmos OS, there is no setvect() or getvect(): all interrupts go through one handler. This is simpler, but slower:
http://www.execpc.com/~geezer/os/index.htm#cosmos
Right.
>Also, does anyone know where I can find a good example of setting up a IDT?
This (NASM) code sets up handlers for all 256 INTs. There are also setvect() and getvect() functions to change the handlers from C:
http://www.execpc.com/~geezer/osd/code/osd6/kstart.asm
Similar code:
http://www.execpc.com/~geezer/osd/intr/x86-32.zip
In the current version of my Cosmos OS, there is no setvect() or getvect(): all interrupts go through one handler. This is simpler, but slower:
http://www.execpc.com/~geezer/os/index.htm#cosmos
Re: GDT, IDT
Could you maybe give me an example of using the getvect() and setvect functions please(from kstart.asm)?
Thanks,
K.J.
Thanks,
K.J.
Re: GDT, IDT
>Could you maybe give me an example of using the getvect() and setvect functions please(from kstart.asm)?
http://www.execpc.com/~geezer/osd/code/osd6/main.c
down at the bottom, in main()
http://www.execpc.com/~geezer/osd/code/osd6/main.c
down at the bottom, in main()
Re: GDT, IDT
Thanks, that's what I needed. However, your link to the file didn't work, but I found it in osd.zip.
Thanks,
K.J.
Thanks,
K.J.