You may check

Linux I/O port programming mini-HOWTO

There are other ports like parallel port and serial port, these are getting replaced with USB.