PEBKAC style OS development problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ucosty

PEBKAC style OS development problems

Post 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]
ucosty

Re:PEBKAC style OS development problems

Post 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?
ucosty

Re:PEBKAC style OS development problems

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PEBKAC style OS development problems

Post 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 ...
ucosty

Re:PEBKAC style OS development problems

Post 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)
Post Reply