Condition: jumps if OF = 0. After a signed ADD, SUB, INC, DEC, NEG or IMUL it means the result is exactly right; the "happy path" of checked arithmetic usually continues with JNO OK1 while the fall-through handles the error. After CMP it means the subtraction did not overflow, which on its own says nothing about which value is larger.
MOV AL, 100ADD AL, 20 ; 120 still fits a signed byte: OF = 0MOV DL, "Y" ; MOV leaves the flags aloneJNO SHOW1 ; taken: DL stays "Y"MOV DL, "N"SHOW1:MOV AH, 02h ; DOS: print the character in DLINT 21h
Mind the difference with the carry: MOV AL, 200 / ADD AL, 100 gives OF = 0 (as signed it is −56 + 100 = 44, which fits) but CF = 1, since the unsigned sum 300 does not fit. JNO would happily accept it. Choose OF for signed data and CF for unsigned data.
Range
On the 8086 JNO exists only in the SHORT form: two bytes, opcode 71h 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.
JO 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 81h followed by a 16-bit displacement (32-bit in 32-bit code), so from the 386 on JNO can reach anywhere in the segment. Code for the 8086 must stay with the short form.