📜  8086微处理器中的逻辑指令

📅  最后修改于: 2021-06-28 14:50:40             🧑  作者: Mango

逻辑指令是执行基本逻辑运算(例如AND,OR等)的指令。在8086微处理器中,目标操作数不必是累加器。

下表显示了逻辑指令列表:

OPCODE OPERAND DESTINATION EXAMPLE
AND D, S D = D AND S AND AX, 0010
OR D, S D = D OR S OR AX, BX
NOT D D = NOT of D NOT AL
XOR D, S D = D XOR S XOR AL, BL
TEST D, S performs bit-wise AND operation and affects the flag registor TEST [0250], 06
SHR D, C shifts each bit in D to the right C times and 0 is stored at MSB position SHR AL, 04
SHL D, C shifts each bit in D to the left C times and 0 is stored at LSB position SHL AX, BL
ROR D, C rotates all bits in D to the right C times ROR BL, CL
ROL R, C rotates all bits in D to the left C times ROL BX, 06
RCR D, C rotates all bits in D to the right along with carry flag C times RCR BL, CL
RCL R, C rotates all bits in D to the left along with carry flag C times RCL BX, 06

D代表目的地,S代表源,C代表计数。
它们可以是寄存器,数据或存储器地址。