Ok, but what about current? Isn't current from the nand gate to the pins much higher than the 100K pull-up resistors? I mean if I hook the nand directly and I decide to program the at89c52 and it works then I'm awfully lucky because their datasheet doesn't tell me its safe to put those pins at a (strong) logic high or logic low. I just don't want to blow up something inside a chip.
My other idea is to eliminate pull-ups and replace diodes with resistors but then if I do that, and the at89c52 decides to output all lows on those pins during programming, and I set some nand outputs to high then I'd be wasting some current, but I'm not sure I'm ready to trust a direct connection from nand output to the micro.