Condition: jumps if ZF = 1 or SF ≠ OF. After CMP a, b, ZF = 1 means a = b and SF ≠ OF means a < b (see JL for why the sign and overflow flags are compared), so together they mean a ≤ b for signed numbers. It is the exact opposite of JG. The unsigned twin is JBE.
It fits the bottom of a counting loop written like "for i = 1 to 5", where the last value must still run:
MOV BL, 1 ; i = 1NEXT1:MOV AL, BLADD AL, "0" ; digit -> characterMOV DL, ALMOV AH, 02h ; DOS: print the character in DLINT 21hINC BLCMP BL, 5JLE NEXT1 ; while i <= 5
If the counter could start above the limit, test before the body as well, or the loop runs once anyway.
Range
On the 8086 JLE exists only in the SHORT form: two bytes, opcode 7Eh and a signed 8-bit displacement counted from the end of the instruction. The target must lie within −128..+127 bytes of that point. To go farther, invert the test and hop over an unconditional JMP, which can reach the whole segment. MASM 6 makes this rewrite itself when it finds the target out of range (its default OPTION LJMP), so the listing may show two instructions where you wrote one.
JG SKIP1 ; the opposite test, a short hopJMP FARAWAY ; any distance in the segmentSKIP1:
Later CPUs
The 80386 added a near form of every conditional jump, 0Fh 8Eh followed by a 16-bit displacement (32-bit in 32-bit code), so from the 386 on JLE can reach anywhere in the segment. Code for the 8086 must stay with the short form.