Your problem seems to be more that the IOs are configured as input after a reset. For an 8051 the output transistor (open collector)
is open after a reset and you'll see a high because of the internal pull-up resistor.When using e.g. a PIC there is no internal pull-up resistor. So this input pin (that's what it is after a reset) is floating between high and low.The only thing you can do is adding an external pull-down resistor to have a defined low-level after reset.