Added segmentation (flat memory) and interrupts handling