Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->CJNE

CJNE       Compare and Jump if Not Equal

Assembler Mnemonic: CJNE <dest byte>,<src byte>, <rel addr>

CJNE compares the magnitudes of the first two operands and branches if their values are now equal.

Formats:
    
DescriptionMnemonicBytesCycles
    
Compare Indirect to Immediate:CJNE @Ri,#<data>,<code addr>32
Compare Immediate to Accumulator:CJNE A,#<data>,<code addr>32
Compare Memory to Accumulator:CJNE A,<direct addr>,<code addr>32
Compare Immediate to Register:CJNE Rr,#<data>,<code addr>32
where Ri is R0 or R1 and Rn is R0 - R7
    
PSW:CACF0RS1RS0OVP
*N/AN/AN/AN/AN/AN/A
(N/A: Not affected)

The carry flag is set if the unsigned integer value of <dest byte> is less than the unsigned integer value of <src byte>, otherwise it is cleared.

Neither operand is affected.