implemented interrupts and related instructions

Only software interrupts for now.