Open the file \Device\iomem_io and read/write to it at offsets corresponding to the port number in size of 1,2 or 4 bytes