Modifying PIC code to use kernel interrupt manager