I wrote a little page that compares setting up a UART on a bunch of micros.
http://www.teholabs.com/docs/knowledge:uartsaya (http://www.teholabs.com/docs/knowledge:uartsaya)
Might be of interest to some here.
If you want to write it for your favorite micro I can probably add it to the list. Those micros included are what I had sitting on my computer.
i have some code you can add for the 8051, if your interested?
I am curious as I have never used one.