Detailed reference for the BNC instruction in PIC18 ISA.
Branch if NOT Carry (BNC).
Performs a relative branch if the Carry flag (C) is cleared.
The branch target is specified by a label; the assembler automatically encodes the offset.
; Branch taken if Carry cleared
CLRC
BNC BranchTaken ; PC jumps to BranchTaken because C=0; Branch taken if Carry cleared
CLRC
BNC BranchTaken ; PC jumps to BranchTaken because C=0; Branch not taken because Carry set
SETC
BNC BranchTaken ; execution continues after BNC because C=1; Branch not taken because Carry set
SETC
BNC BranchTaken ; execution continues after BNC because C=1; Simple BNC use with a label offset
BNC OffLabel ; relative branch to OffLabel when C=0; Simple BNC use with a label offset
BNC OffLabel ; relative branch to OffLabel when C=0