I've got a problem where port 2 on a c166 gets written to for no apparent reason, and I was just wondering if anyone would have some suggestios on what could be the cause. My problem is the following: Port 2 is configured as all outputs except for bit 0 (i.e. DPP2 = 0xFFFE). My application is apparently running smoothly, apart from some outputs that never get set when they should. After some investigation with the debugger, and having had a look at the assembler code generated, I noticed that the outputs do get set at some point, but for some strange reason they get reset as soon as the contents of R4 change. I first thought that if for some reason the ?C_MAINREGISTERS section were overlapping the SFR area, that could cause the change of the contents of Port 2 (or part of it), but that seems quite improbable. Furthermore, looking at the map file, ?C_MAINREGISTERS seems to be correctly located between 0x0FC00 and 0x0FC1F. I will appreciate any comments. Thanks.