Lecture Five/Part2: 8086 Instruction Set2 Bit Manipulation Instruction
Lecture Five/Part2: 8086 Instruction Set2 Bit Manipulation Instruction
Lecture Five/Part2
8086 Instruction Set2
Bit Manipulation Instruction
NOT ROL
AND SHL / SAL ROR
OR SHR
XOR SAR RCL
RCR
TEST
Logical
OR
Inclusive OR
OR D,S (S) + D) (D) O, S, Z, P, C
Logical
XOR Exclusive OR XOR D,S (S) D) (D) O, S, Z, P, C
AX after
Lecture 5/ Part 2: Bit Manipulation Instruction
Assist. Prof. Dr. Hadeel N. Abdullah 7
Shift
Instructions
Example:
MOV CL, 2H
SHR DX, CL
Solution:
DX before
DX after
Example: Assume CL= 2 and AX= 091AH. Determine the new contents
of AX and CF after the instruction SAR AX, CL is executed.
Solution:
AX before
AX after
AX after
AX after
AX before
AX after
12
Lecture 5/ Part 2: Bit Manipulation Instruction
Assist. Prof. Dr. Hadeel N. Abdullah
13
Lecture 5/ Part 2: Bit Manipulation Instruction
Assist. Prof. Dr. Hadeel N. Abdullah
TEST Instruction