Hi hch16550,
All four ports 0,1,2,3 of MCS51 are bidirectional. However only port 0 is considered "true" bidirectional, because when configured as an input, it floats.
Ports 1,2 and 3 are sometimes called "quasi - bidirectional" due to the fixed internal pullups.
You can read a good document about hardware inside standard MCS51 at:
**broken link removed**
Thus, if you want a "true" bidirectional (high-impedance input) on port 3 you must use an external buffer featuring three state output.
Otherwise, for "quasi - bidirectional" you must accept a weak pullup resistor on the order of 100K ohms pulls the port pin up toward Vcc. Obvious if you want all bits, you must sacrifice various special features provided by micro on port 3 as: INT0,1 T0,1 RX TX RD WR
This behaviour could be slightly different from one MCS51 derivative to another, but from most of them, follows the rules depicted in 80C51_FAM_HARDWARE_1.pdf
Regards,
Silvio