Instructions To Perform Shift Operations Shl/Sal SHR SAR: Microprocessor - 8086 Instruction Sets
Instructions To Perform Shift Operations Shl/Sal SHR SAR: Microprocessor - 8086 Instruction Sets
● ROL − Used to rotate bits of byte/word towards the left, i.e. MSB to LSB
and to Carry Flag [CF].
● ROR − Used to rotate bits of byte/word towards the right, i.e. LSB to
MSB and to Carry Flag [CF].
● RCR − Used to rotate bits of byte/word towards the right, i.e. LSB to CF
and CF to MSB.
● RCL − Used to rotate bits of byte/word towards the left, i.e. MSB to CF
and CF to LSB.
String Instructions
1
● INS/INSB/INSW − Used as an input string/byte/word from the I/O port
to the provided memory location.
● OUTS/OUTSB/OUTSW − Used as an output string/byte/word from the
provided memory location to the I/O port.
● SCAS/SCASB/SCASW − Used to scan a string and compare its byte with
a byte in AL or string word with a word in AX.
● LODS/LODSB/LODSW − Used to store the string byte into AL or string
word into AX.
2
● JLE/JNG − Used to jump if less than/equal/if not greater than
instruction satisfies.
● JNC − Used to jump if no carry flag (CF = 0)
● JNE/JNZ − Used to jump if not equal/zero flag ZF = 0
● JNO − Used to jump if no overflow flag OF = 0
● JNP/JPO − Used to jump if not parity/parity odd PF = 0
● JNS − Used to jump if not sign SF = 0
● JO − Used to jump if overflow flag OF = 1
● JP/JPE − Used to jump if parity/parity even PF = 1
● JS − Used to jump if sign flag SF = 1
These instructions are used to execute the given instructions for number of
times. Following is the list of instructions under this group −
● LOOP − Used to loop a group of instructions until the condition
satisfies, i.e., CX = 0
● LOOPE/LOOPZ − Used to loop a group of instructions till it satisfies ZF =
1 & CX = 0
3
● LOOPNE/LOOPNZ − Used to loop a group of instructions till it satisfies
ZF = 0 & CX = 0
● JCXZ − Used to jump to the provided address if CX = 0
Interrupt Instructions
These instructions are used to call the interrupt during program execution.
● INT − Used to interrupt the program during execution and calling
service specified.
● INTO − Used to interrupt the program during execution if OF = 1
● IRET − Used to return from interrupt service to the main program