Jump Less or Equal (JLE)

Jump Less or Equal (JLE) in ASM2 assembly language is used for conditional branching based on whether the first operand in a previous comparison is less than or equal to the second operand. The instruction evaluates both the sign flag (SF) and the zero flag (ZF) in the status register to decide the jump condition.

Syntax for Using JLE: JLE <label/function_name> JLE LESS_OR_EQUAL_CASE

Where:

  • <label/function_name> refers to the label or function the program will jump to if the first operand is less than or equal to the second.

Technical Details:

  • Flag Consideration: JLE examines the sign flag (SF) and the zero flag (ZF). The jump occurs if SF indicates a negative result or if ZF is set (1), which means the operands are equal.

  • Role in Decision Structures: Typically used after a CMP (compare) instruction, JLE facilitates branching in situations where a value is less than or equal to another, thereby supporting inclusive comparative logic.

Last updated