Added code for ioport.