Hello,
This one is going to be dependant on the OS. For example, in linux, I can read the raw data on the parallel port by doing some things with the hardware in C, and "read" the port. I take a look at the high (voltage up) and low (no volts) and determine an "answer".
BUT
You are trying to do serial information, so the data is going to be "organized". Your 10 bits might have 1 start bit, 8 data bits, and a stop bit. Your code will probably be OS dependant.
I would suggest doing a google search on this. For me, it would be Linux (as my Mac has USB and that is something else entirely) so I would search on "Linux Serial Port Programming" and I found this:
http://tldp.org/HOWTO/Serial-Programming-HOWTO/index.html
If you do lift sample code, you should in your comments credit the source of the algorithm.
Christian