On Wed, 05 Nov 1997 17:10:40 +1000 TONY NIXON 54964 writes: >>For example, clrf STATUS will clear all the page bits, not affect the >>TO and PD bits, set the Z bit, *and not change C or DC*. It says so >>in the Microchip book and also does so on a real chip. A movwf >STATUS >>*will* write to C,DC, and Z, because movwf doesn't inherently affect >>any status bits. > >In my data book... > >For example, CLRF STATUS will clear all bits except for TO and PD and >then set the Z bit and leave STATUS register as 000UU100. An old data book (1994 paper "Microchip Data Book") agrees with you. A newer one (16X84 pdf on the 1996 CD) has the section about the STATUS register rewritten. It says: "If the STATUS register is the destination for an instruction which modifies the Z, DC, or C bits, then the write to these three bits is disabled." "For example, CLRF STATUS will clear the upper three bits and set the Z bit. This leaves the STATUS register as 000uu1uu (where u=unchanged)" My experience with a 1997-made 16F84 has been that CLRF STATUS doesn't clear the C bit. I don't know if the old silicon works differently or if it is a mistake in the old book. The description in the new book is that if the instruction can change one or more of the bits, hardware "locks-out" writing to all three. I would assume this is true for rotate as well as clear, and, or, add, etc.