Fresh from the box these processors don't come with a bootloader so it doesn't 'know' anything about standard serial ports per se but it does have a serial programming mode. It is expecting an external shift clock (SCK) to move serial data to the input pin (MOSI) or to read data from the output pin (MISO).
To quote from the data sheet.
"Serial Programming Algorithm
To program and verify the AT89S51 in the serial programming mode, the following sequence is recommended:
a. Apply power between VCC and GND pins.
b. Set RST pin to “H”.
If a crystal is not connected across pins XTAL1 and XTAL2, apply a 3 MHz to 33 MHz clock to XTAL1 pin and wait for at least 10 milliseconds.
- Enable serial programming by sending the Programming Enable serial instruction to pin MOSI/P1.5.
The frequency of the shift clock supplied at pin SCK/P1.7 needs to be less
than the CPU clock at XTAL1 divided by 16.
- The Code array is programmed one byte at a time in either the Byte or Page mode. The
write cycle is self-timed and typically takes less than 0.5 ms at 5V.
Any memory location can be verified by using the Read instruction that returns the content at the selected address at serial output MISO/P1.6.15
At the end of a programming session, RST can be set low to commence normal device operation.
Power-off sequence (if needed):
- Set XTAL1 to “L” (if a crystal is not used).
- Set RST to “L”.
- Turn VCC power off.
The Data Polling feature is also available in the serial mode. In this mode, during
a write cycle an attempted read of the last byte written will result in the complement of the MSB of the serial output byte on MISO."