Page 1 of 1

PEBKAC style OS development problems

Posted: Sat Jul 12, 2003 7:52 am
by ucosty
I am very new to OS development so please excues me if I make huge mistakes in any of my code etc...

I am writing an operating system that uses the GRUB boot loader to create a protected mode environment. It then prints some text and halts for the moment.

I have been browsing the net - but much to my disapointment all the help on setting up an IDT has only made me more confused.

Basically what I want to be able to do is to set up some interupt control so I can use the keyboard for input in protected mode.

How do you set up a working IDT that links to appropriate ISR functions to actully do stuff ;D

My source code is here http://ucosty.is-a-geek.net:1200/offsite/uCostyOS.zip

If this link does not work it is also attatched to this post without the image (takes over 30kb with :S)

It has a working boot image inside.


[attachment deleted by admin]

Re:PEBKAC style OS development problems

Posted: Sun Jul 13, 2003 1:01 am
by ucosty
ok after some more work I now have a working IDT (tested with a forced interrupt which works :) :) :)). Now I need to be able to get and respond to hardware interrupts.

What do I need to set up to respond to these hardware interrupts?

Re:PEBKAC style OS development problems

Posted: Sun Jul 13, 2003 7:57 am
by ucosty
I know I have my IDT set up correctly - but I cannot get hadrware IRQ's to set off ISR routines.

I have remapped the PICs so that IRQ0 is at 0x20 and IRQ8 is at 0x28 but nothing happens if I wait for an interupt at these locations. I can manually set them off with INT 0x20 but this is not the point :P

Any help would be greatly appreciated.

Re:PEBKAC style OS development problems

Posted: Sun Jul 13, 2003 8:00 am
by Pype.Clicker
well, if you had unmasked the corresponding interrupt lines (with ports 0x21 and 0xa1) and enabled the hardware interrupts at the CPU (with a STI), everything should be okay ...

Re:PEBKAC style OS development problems

Posted: Sun Jul 13, 2003 9:10 am
by ucosty
thankyou

I now have keyboard input that works to a degree :o

I have to start again though - my project is really badly organised >:( oh well not too bad for my second os project (first died ages ago before I even got to the kernel bit :p)