Dominic Gualtieri wrote: > I am basically new to Pic`s and I am having trouble understanding a > line in some code I came across. Any help would be appreciated. > Below is the code: > > movlw 0D0 > btfss portc,w --Is this line checking for a specific bit, > and if so which one? Dominic: The author of this code was also new to PICs... Or he was going to a lot of trouble to make his code difficult to understand. The code assembles without errors only because of a convenient accident: Internally, MPASM defines "W" as equivalent to "0" so instructions like "MOVF REG,W" will assemble correctly. Because MPASM treats "W" as "0", the BTFSS line is assembled as "BTFSS PORTC,0"... So it's checking bit 0 of the "PORTC" register. I'd be real surprised if that's what the code's author intended, though. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 (personal) === http://www.netcom.com/~fastfwd (business)