0% found this document useful (0 votes)
109 views4 pages

Instructions To Perform Shift Operations Shl/Sal SHR SAR: Microprocessor - 8086 Instruction Sets

The document describes various instruction sets for the 8086 microprocessor, including instructions for shift and rotate operations, string operations, program execution transfer (branching and looping), processor control, iteration control, and interrupts. Some key instructions are SHL/SAL for left shifts, REP for repeating other instructions, CALL for procedure calls, conditional jump instructions like JE/JZ, STC for setting flags, and INT for software-generated interrupts.

Uploaded by

Yaqeen Matheam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views4 pages

Instructions To Perform Shift Operations Shl/Sal SHR SAR: Microprocessor - 8086 Instruction Sets

The document describes various instruction sets for the 8086 microprocessor, including instructions for shift and rotate operations, string operations, program execution transfer (branching and looping), processor control, iteration control, and interrupts. Some key instructions are SHL/SAL for left shifts, REP for repeating other instructions, CALL for procedure calls, conditional jump instructions like JE/JZ, STC for setting flags, and INT for software-generated interrupts.

Uploaded by

Yaqeen Matheam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Microprocessor - 8086 Instruction Sets

Instructions to perform shift operations

● SHL/SAL​ − Used to shift bits of a byte/word towards left and put


zero(S) in LSBs.
● SHR​ − Used to shift bits of a byte/word towards the right and put
zero(S) in MSBs.
● SAR​ − Used to shift bits of a byte/word towards the right and copy the
old MSB into the new MSB.

Instructions to perform rotate operations

● 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

String is a group of bytes/words and their memory is always allocated in a


sequential order.
Following is the list of instructions under this group −
● REP​ − Used to repeat the given instruction till CX ≠ 0.
● REPE/REPZ​ − Used to repeat the given instruction until CX = 0 or zero
flag ZF = 1.
● REPNE/REPNZ​ − Used to repeat the given instruction until CX = 0 or
zero flag ZF = 1.
● MOVS/MOVSB/MOVSW​ − Used to move the byte/word from one
string to another.
● COMS/COMPSB/COMPSW​ − Used to compare two string bytes/words.

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.

Program Execution Transfer Instructions (Branch and Loop Instructions)

These instructions are used to transfer/branch the instructions during an


execution. It includes the following instructions −
Instructions to transfer the instruction during an execution without any
condition −
● CALL​ − Used to call a procedure and save their return address to the
stack.
● RET​ − Used to return from the procedure to the main program.
● JMP​ − Used to jump to the provided address to proceed to the next
instruction.
Instructions to transfer the instruction during an execution with some
conditions −
● JA/JNBE​ − Used to jump if above/not below/equal instruction satisfies.
● JAE/JNB​ − Used to jump if above/not below instruction satisfies.
● JBE/JNA​ − Used to jump if below/equal/ not above instruction satisfies.
● JC​ − Used to jump if carry flag CF = 1
● JE/JZ​ − Used to jump if equal/zero flag ZF = 1
● JG/JNLE​ − Used to jump if greater/not less than/equal instruction
satisfies.
● JGE/JNL​ − Used to jump if greater than/equal/not less than instruction
satisfies.
● JL/JNGE​ − Used to jump if less than/not greater than/equal instruction
satisfies.

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

Processor Control Instructions

These instructions are used to control the processor action by


setting/resetting the flag values.
Following are the instructions under this group −
● STC​ − Used to set carry flag CF to 1
● CLC​ − Used to clear/reset carry flag CF to 0
● CMC​ − Used to put complement at the state of carry flag CF.
● STD​ − Used to set the direction flag DF to 1
● CLD​ − Used to clear/reset the direction flag DF to 0
● STI​ − Used to set the interrupt enable flag to 1, i.e., enable INTR input.
● CLI​ − Used to clear the interrupt enable flag to 0, i.e., disable INTR
input.

Iteration Control Instructions

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy