ELAN EM78P156NP microcntroller programming
The power-on and RESET state of the IOC registers is all 1s, which means the port pins are high impedance, so they can't drive anything.



You need to read the chip datasheet carefully to see what has to be initialized or set up. Never assume the compiler does anything like that for you, only the minimum startup like clearing statics and such like. Hardware such as watch dog timers, ports, options, configuration is usually untouched and likely not what you want. Using a compiler does not mean you can ignore how the chip works, it means you have more things to understand.

There may be other things wrong- your delay loop will be very short unless your clock frequency is very low. Also, the registers are all 8 bits, not 16.

The EM78P156NP is an OTP processor- I hope you are using an emulator- otherwise you're going to have an enormous stack of useless chips.