8051 serial programmer issue
Have a look at this: -



Pin 2 is shown as the input receive line to the PC and this means you connect this line to your 232 transmit output. At the moment your diagram shows it connected to your receive input.

I'm not saying it'll fix your "loopback" problem - that may be connected to this wiring error so try this first.