Added tty, segment addresation and interrupts handling