I've tried to make this fairly platform-independant as some PowerPC platforms may not have openpic-style interrupt controllers. This may not have the best performance but it works for now.