Monday, 25 April 2011

Interrupted

As the title may suggest I've got hardware interrupts working.

I have written all the IRQ stubs (just used macro's, which speeds up progress quite a lot) and have lead it to a C handler. The C handler resets the PIC and returns.
Before this could be used though I had to configure the PIC itself. Here is where the issues started as the device has quite a number of options.

My sources in this case were both the OSDev wiki and the Brokenthorn article.

If you want to just have code and not understand what it does, I recommend the OSDev Wiki as it provides you with readable code snippets. The wiki also provides you with plenty of information, but just in case you want to know what the initialisation control words are, I recommend the Brokenthorn article.

This too offers a code sample which is in plain NASM assembly. I personally prefer to have C code but if you want the speed enhancement assembly offers (which by the way isn't that much because you have to wait for the PIC to get ready every time), you can also use the sample in the Brokenthorn article.

Click here to see the commit this whole post is about.

No comments:

Post a Comment