I program an 8051 controller which is embedded in an ASIC. Several functions of the ASIC can be controlled by writing to the 8501's ports, but reading the same ports leads to different functions of the ASIC. E.g. writing to P0 controls an oscillator whereas i get a temperature value by reading P0. Is there a proper way to assign two names to a port for either read - or write access and is there a possiblity to prevent programmers from accessing those the wrong way? Thanks for your help! Tobias