Texas Instruments MSP430x1xx Computer Hardware User Manual


 
Instruction Set
3-47
RISC 16−Bit CPU
JL Jump if less
Syntax JL label
Operation If (N .XOR. V) = 1 then jump to label: PC + 2 × offset −> PC
If (N .XOR. V) = 0 then execute following instruction
Description The status register negative bit (N) and overflow bit (V) are tested. If only one
is set, the 10-bit signed offset contained in the instruction LSBs is added to the
program counter. If both N and V are set or reset, the instruction following the
jump is executed.
This allows comparison of signed integers.
Status Bits Status bits are not affected.
Example When the content of R6 is less than the memory pointed to by R7, the program
continues at label EDE.
CMP @R7,R6 ; R6 < (R7)?, compare on signed numbers
JL EDE ; Yes, R6 < (R7)
...... ; No, proceed
......
......