Can anybody recommend any freeware virtual null modem software?

Or, failing that, how would you begin to program something like this yourself? Sounds like it might be an interesting project.

Thanks!