code updated to taje into account IDT, ISR and IRQ