📜  8086微处理器中的程序执行传输指令

📅  最后修改于: 2021-06-28 09:01:54             🧑  作者: Mango

先决条件– 8085微处理器中的分支指令

程序执行转移指令类似于分支指令,并且是指由于执行分支指令而将执行切换到不同指令序列的动作。

程序执行转移指令的两种类型是:

  1. 无条件的
  2. 有条件的

1.无条件程序执行转移指令–这些指令始终执行。

Opcode Operand Explanation Example
CALL address calls a subroutine and saves the return address on the stack CALL 2050
RET none returns from the subroutine to the main program RET
JUMP address transfers the control of execution to the specified address JUMP 2050
LOOP address loops through a sequence of instructions until CX=0 LOOP 2050

在此可以直接或间接指定地址。

2.条件程序执行转移指令:这些指令仅在指定条件为真时执行。

Opcode Operand Explanation Example
JC address jump if CF = 1 JC 2050
JNC address jump if CF = 0 JNC 2050
JZ address jump if ZF = 1 JZ 2050
JNZ address jump if ZF = 0 JNZ 2050
JO address jump if OF = 1 JO 2050
JNO address jump if OF = 0 JNO 2050
JP address jump if PF = 1 JP 2050
JNP address jump if PF = 0 JNP 2050
JPE address jump if PF = 1 JPE 2050
JPO address jump if PF = 0 JPO 2050
JS address jump if SF = 1 JS 2050
JNS address jump if SF = 0 JNS 2050
JA address jump if CF=0 and ZF=0 JA 2050
JNBE address jump if CF=0 and ZF=0 JNBE 2050
JAE address jump if CF=0 JAE 2050
JNB address jump if CF=0 JNB 2050
JBE address jump if CF = 1 or ZF = 1 JBE 2050
JNA address jump if CF = 1 or ZF = 1 JNA 2050
JE address jump if ZF = 1 JE 2050
JG address jump if ZF = 0 and SF = OF JG 2050
JNLE address jump if ZF = 0 and SF = OF JNLE 2050
JGE address jump if SF = OF JGE 2050
JNL address jump if SF = OF JNL 2050
JL address jump if SF != OF JL 2050
JNGE address jump if SF != OF JNGE 2050
JLE address jump if ZF = 1 or SF != OF JLE 2050
JNG address jump if ZF = 1 or SF != OF JNG 2050
JCXZ address jump if CX = 0 JCXZ 2050
LOOPE address loop while ZF = 1 and CX = 0 LOOPE 2050
LOOPZ address loop while ZF = 1 and CX = 0 LOOPZ 2050
LOOPNE address loop while ZF = 0 and CX = 0 LOOPNE 2050
LOOPNZ address loop while ZF = 0 and CX = 0 LOOPNZ 2050

在此可以直接或间接指定地址。
CF为进位标志
ZF为零标志
OF是溢出标志
PF是奇偶校验标志
SF是标志标志
CX是寄存器