CJB, CJBE

 

CJB        fr,#literal,addr9        Compare fr to literal and jump if below


Words:        4        Cycles:        4 or 5 (jump)        Affects:        C, DC, Z

 

Operation:        Fr is compared to literal via W. If fr is less than literal, a jump to addr9 is executed.

 

Coding:        MOVLW                literal

       SUBWF                fr,0

       BTFSS                3,0

       GOTO                addr9 ad

 

 

CJB        fr1,fr2,addr9                Compare fr1 to fr2 and jump if below


Words:        4        Cycles:        4 or 5 (jump)        Affects:        C, DC, Z

 

Operation:        Fr1 is compared to fr2 via W. If fr1 is less than fr2, a jump to addr9 is executed.

 

Coding:        MOVF                fr2,0

       SUBWF                fr1,0

       BTFSS                3,0

       GOTO                addr9b a

 

 

CJBE        fr,#literal,addr9    Compare fr to literal and jump if below or equal


Words:        4        Cycles:        4 or 5 (jump)        Affects:        C, DC, Z

 

Operation:        Fr is compared to literal via W. If fr is less than or equal to literal, a jump to addr9 is executed.

 

Coding:        MOVLW                literal

       ADDWF                fr,0

       BTFSS                3,0

       GOTO                addr9

 

 

CJBE        fr1,fr2,addr9        Compare fr1 to fr2 and jump if below or equal


Words:        4        Cycles:        4 or 5 (jump)        Affects:        C, DC, Z

 

Operation:        Fr1 is compared to fr2 via W. If fr1 is less than or equal to fr2, a jump to addr9 is executed.

 

Coding:        MOVF                fr1,0

       SUBWF                fr2,0

       BTFSS                3,0

       GOTO                addr9