Ken Parkyn wrote: > I have a problem using a 16C64. > > 00028 init bsf STATUS,5 ;go to bank 1 > 00029 movlw 0x3F > 00030 movwf TRISA ;set port a as inputs > .... > 00034 bcf STATUS,5 ;back to bank 0 > 00035 clrf PORTA > > When I single-step it on MPSIM, at the instruction to clear PORTA, > (00035) PORTA remains at 3F and the program steps on to the next > instruction > > Is this an oddity of MPSIM, the 16c64 or me? It's you, Ken. You've made PORTA all inputs; clearing the port output latches (which is what happens when you execute a "CLRF PORTA") won't affect what's read from the input pins, which is what MPSIM shows as the contents of the PORTA register. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499