22-05-2012, 03:19 PM
CONDITIONAL JUMPS
Below and above are used when we are working with unsigned binary numbers.
•Greater and less are used when we are working with signed binary numbers.
•Conditional jumps are short jump within the same code segment and address is in range -128 to +127.
•Conditional jumps are usually used after arithmetic or logic instructions.
•CMP BL, DHJAE Heater_Off
IF…….THEN
•If<condition/expression> thenactionaction
•Implemented with conditional jump instruction.
•CMP AX, BX ; compare to set flagJE THERE ; if equal then skip correctionADD AX, 0002H ; Add correction factorTHERE: MOV CL, 07H ; Load count
•CMP AX, BX ; compare to set flagJNE FIX ; if not equal do correctionJMP THERE; if equal than skip correctionFIX : ADD AX, 002H ; Add correction factorTHERE: MOV CL, 07H ; load count