100% found this document useful (1 vote)
2K views9 pages

Microprocessor Instruction Set

The document discusses the instruction set of the 80186 microprocessor. It defines an instruction as the basic programming command that makes up an instruction set. The instruction set refers to all instructions that can be executed by a microprocessor. Instructions are made up of op-codes and operands, where the op-code identifies the action and operands specify sources and destinations. Examples of different types of instructions are provided such as data transfer, arithmetic, string, logical, shift/rotate, and program control instructions. Additional instructions added in the 80186 processor are also outlined.

Uploaded by

Geshan Manandhar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views9 pages

Microprocessor Instruction Set

The document discusses the instruction set of the 80186 microprocessor. It defines an instruction as the basic programming command that makes up an instruction set. The instruction set refers to all instructions that can be executed by a microprocessor. Instructions are made up of op-codes and operands, where the op-code identifies the action and operands specify sources and destinations. Examples of different types of instructions are provided such as data transfer, arithmetic, string, logical, shift/rotate, and program control instructions. Additional instructions added in the 80186 processor are also outlined.

Uploaded by

Geshan Manandhar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

80186 Instruction ( Inst ) Set

75+ Instructions Summarized.

February 20, 2010


Instruction and Instruction Set 1.
• An instruction is the basic command, in
other words it is the most rudimentary
programming command.
• Instruction set refers to the set of all the
instructions that can be executed by a
microprocessor.
• Instruction = Op-Code+Operands
• Op-Code identifies the action to be
taken and operands specify source and
destination.
Instruction and Instruction Set 2.
• Op-Codes are also referred to as
mnemonic, written in abbreviated
form for ex: move is only mov as an
instruction.
• Instructions can use CPU register
(including accumulator), memory
locations or I/O ports as per need.
• Simple instruction format :
op-code destination, source
mov ax, bx (comma
separated.)
Basic Instruction Know How?
• When two operands are required for
an instruction they are separated by
comma. For example: REG, memory
• When there are two operands, both
operands must have the same size
(except shift and rotate instructions).
For example: AL, DL-- DX, AX
• Some instructions allow several
operand combinations. For example:
memory, immediate -- REG,
immediate
memory, REG -- REG, REG
Categorization of Instructions of 186 Mp.
Examples of Instructions 1.
• Data Transfer Instructions
• General Purpose
• MOV ax,bx ;will move contents of bx to ax
• Conversion
• CBW ; will convert 8 bits to word 16 bits ie if ;al<80h,
then ah <- 00, if al>7f, then ah<-ffh
• Arithmetic Instructions
• Addition
• ADD dx,ch; add dx and ch and put result in dx
• Division
• DIV bl; divide ah by bl and put result in ax
Examples of Instructions 2.
• String
• LODSB; accesses data segment, al<- ;ds:
[si]
• CMPSB ; compare string byte pointer by
;ds:[si] and es:[si]
• Logical
• AND cx,dx ; perform bit by bit and ;between
cx and dx, result in ;cx.
• TEST cx,dx ;same as AND but will only
;update flags not cx’s contents.
Examples of Instructions 3.
• Shift And Rotate
• SHL ax,1;shift word operand 1 to left
• ROR membds,cl ; rotate data right cl
;times.
• Program Control
• Conditional Transfer
• JO ;jump if zero flag is on
• REPNE scasb;repeat if zf=0 cx is not equal to 0
• Iteration
• LOOP mems ;cx<-cx-1, if cx is not equal to 0,
;the ip<-mems (short range)
Examples of Instructions 4 & 186 Additions
• Processor Control
• NOP ;uses 3 clock cycles & increments ip
;to point to next instruction
• Instruction added in 186 processor
• ENTER Make stack frame for procedure
parameters
• LEAVE High-level procedure exit
• PUSHA Push all general registers
• POPAPop all general registers
• BOUND Check array index against bounds
• IMUL Signed (integer) multiply
• INS Input from port to string
• OUTS Output string to port

You might also like