Technically you would need the SAE standard for the codes. However there are a number of websites that will give you the basic OBDII commands.

As far as software, go to scantool.net and use their opensource software. If you look through their code you will find most of the OBDII commands.