I use AT89C51 chip without external RAM and ROM.
I use the PORT0 as below :
P0_0<------  input
P0_1<------  input
P0_2 ------> output  --  <---- abnormal operation
P0_3 ------> output    |
P0_4 ------> output    |
P0_5 ------> output    |
P0_6 ------> output    |
P0_7 ------> output  --
In case of input ports, all things are going well, but I can't see the right output
on other ports, all ports remain low level, even if I set or reset the ports. In case of P1 port, all ports are
going well.
compile : sdcc --debug --model-small ver2.c
(ver2.c is a filename.)