ASM2 - Documentation
  • 📚ASM2 - Documentation
  • Registers
  • Address Registers
  • Instructions
    • DISP
    • END
    • MOV
    • RET
  • Operators
    • ADD
    • SUB
    • MUL
    • DIV
  • Functions
  • Subroutines
  • Jump
    • Conditional Jump
      • Jump Equal (JE)
      • Jump Not Equal (JNE)
      • Jump Greater (JG)
      • Jump Greater or Equal (JGE)
      • Jump Less (JL)
      • Jump Less or Equal (JLE)
    • Unconditional Jump
Powered by GitBook
On this page
  1. Jump
  2. Conditional Jump

Jump Less (JL)

In the ASM2 assembly language, Jump Less (JL) is a control flow instruction that directs program execution to a specified label or function if the result of a previous comparison indicates that the first operand is less than the second. This instruction evaluates the sign flag (SF) within the status register to determine the outcome of the comparison.

Syntax for Using JL: JL <label/function_name> JL LESS_CASE

Where:

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

Technical Details:

  • Flag Evaluation: JL checks the state of the sign flag (SF). If SF is set in a manner indicating a negative result (i.e., the first operand is less), the program control jumps to the specified label or function.

  • Application in Comparative Logic: Commonly used following a CMP (compare) instruction, JL enables decision-making in scenarios where one value is less than another.

PreviousJump Greater or Equal (JGE)NextJump Less or Equal (JLE)

Last updated 1 year ago