📄 8086_instruction_set.html
字号:
JB label1 PRINT 'AL is not below 5' JMP exitlabel1: PRINT 'AL is below 5'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JBE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JBE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Below or Equal to second operand (as set by CMP instruction).Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 1 or ZF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 5 CMP AL, 5 JBE label1 PRINT 'AL is not below or equal to 5' JMP exitlabel1: PRINT 'AL is below or equal to 5'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JC"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JC</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if Carry flag is set to 1.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 255 ADD AL, 1 JC label1 PRINT 'no carry.' JMP exitlabel1: PRINT 'has carry.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JCXZ"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JCXZ</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if CX register is 0.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CX = 0 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV CX, 0 JCXZ label1 PRINT 'CX is not zero.' JMP exitlabel1: PRINT 'CX is zero.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Equal to second operand (as set by CMP instruction).Signed/Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if ZF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 5 CMP AL, 5 JE label1 PRINT 'AL is not equal to 5.' JMP exitlabel1: PRINT 'AL is equal to 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JG"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JG</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Greater then second operand (as set by CMP instruction).Signed.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if (ZF = 0) and (SF = OF) then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 5 CMP AL, -5 JG label1 PRINT 'AL is not greater -5.' JMP exitlabel1: PRINT 'AL is greater -5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JGE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JGE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Greater or Equal to second operand (as set by CMP instruction).Signed.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if SF = OF then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 CMP AL, -5 JGE label1 PRINT 'AL < -5' JMP exitlabel1: PRINT 'AL >= -5'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JL"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JL</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Less then second operand (as set by CMP instruction).Signed.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if SF <> OF then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, -2 CMP AL, 5 JL label1 PRINT 'AL >= 5.' JMP exitlabel1: PRINT 'AL < 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JLE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JLE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Less or Equal to second operand (as set by CMP instruction).Signed.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if SF <> OF or ZF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, -2 CMP AL, 5 JLE label1 PRINT 'AL > 5.' JMP exitlabel1: PRINT 'AL <= 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JMP"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JMP</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR> label<BR> 4-byte address<BR> </NOBR></FONT></TD><TD>Unconditional Jump.Transfers control to another part of the program.<I>4-byte address</I> may be entered in this form:<FONT FACE="Fixedsys">1234h:5678h</FONT>, first value is a segment secondvalue is an offset.<BR><BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> always jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 5 JMP label1 ; jump over 2 lines! PRINT 'Not Jumped!' MOV AL, 0label1: PRINT 'Got Here!' RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNA"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNA</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Above second operand (as set by CMP instruction).Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 1 or ZF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 CMP AL, 5 JNA label1 PRINT 'AL is above 5.' JMP exitlabel1: PRINT 'AL is not above 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNAE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNAE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Above and Not Equal to second operand (as set by CMP instruction).Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 1 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 CMP AL, 5 JNAE label1 PRINT 'AL >= 5.' JMP exitlabel1: PRINT 'AL < 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNB"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNB</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Below second operand (as set by CMP instruction).Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 0 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 7 CMP AL, 5 JNB label1 PRINT 'AL < 5.' JMP exitlabel1: PRINT 'AL >= 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNBE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNBE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Below and Not Equal to second operand (as set by CMP instruction).Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if (CF = 0) and (ZF = 0) then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 7 CMP AL, 5 JNBE label1 PRINT 'AL <= 5.' JMP exitlabel1: PRINT 'AL > 5.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNC"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNC</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if Carry flag is set to 0.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if CF = 0 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 ADD AL, 3 JNC label1 PRINT 'has carry.' JMP exitlabel1: PRINT 'no carry.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNE</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Equal to second operand (as set by CMP instruction).Signed/Unsigned.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if ZF = 0 then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 CMP AL, 3 JNE label1 PRINT 'AL = 3.' JMP exitlabel1: PRINT 'Al <> 3.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNG"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNG</FONT></TD><TD><FONT FACE="Fixedsys"> <NOBR>label</NOBR></FONT></TD><TD>Short Jump if first operand is Not Greater then second operand (as set by CMP instruction).Signed.<BR><BR>Algorithm:<BR><BR><FONT FACE="Fixedsys"><UL> if (ZF = 1) and (SF <> OF) then jump</UL></FONT>Example:<PRE><FONT FACE="Fixedsys"> include 'emu8086.inc' #make_COM# ORG 100h MOV AL, 2 CMP AL, 3 JNG label1 PRINT 'AL > 3.' JMP exitlabel1: PRINT 'Al <= 3.'exit: RET</FONT></PRE><FONT FACE="Fixedsys"><TABLE BORDER=1 NOSHADE><TR> <TD>C</TD> <TD>Z</TD> <TD>S</TD> <TD>O</TD> <TD>P</TD> <TD>A</TD> </TR><TR> <TD COLSPAN=6>unchanged</TD> </TR></TABLE></FONT> <A NAME="JNGE"> </A></TD></TR><TR><TD><FONT FACE="Fixedsys">JNGE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -