Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : C. S. Manjula, Grad IETE
Designation : Lab Mechanic
Branch : Computer Engineering
Institute : S.P.W. Polytechnic, Tirupati
Semester : IV Semester
Subject : Microprocessors
Subject Code : CM 405
Topic : Instruction Set
Duration : 50 Minutes
Sub Topic : Instruction Format of 8086
Teaching Aids : PPT
Revised by :K.Srikanth,Lecturer,GPT, Nizamabad

CM404.11 1
Recap

• What is an instruction ?

• Structure of an instruction

• Various representations of an operand

CM404.11 2
Objectives

On completion of this period, you would be able to

• Understand the instruction format of 8086

CM404.11 3
Introduction

• Microprocessor Instruction Format

• Gives the internal structure of an instruction

• Indicates the locations of the Operation Code (Op-Code)


and the operands within the instruction

• Microprocessor Instruction Set

• Collection of Machine codes recognizable by a


Microprocessor
CM404.11 4
Instruction Format

Op-code field Operand Field

• Op-code field: Contains the operation to be performed


by the Processor

• Operand field: Contains the information about the data


on which the operation is to be performed

CM404.11 5
Types of Instruction Formats

Number of Instruction Formats: 6

1. One byte Instructions


2. Register to Register
3. Register to/from memory with no displacement
4. Register to/from memory with displacement
5. Immediate operand to Register
6. Immediate operand to memory with 16-bit
displacement

CM404.11 6
1. One byte instruction: Two possibilities--

(1) With implied operand


D7 D0
Op-Code

(2) With register operand


D7 D3 D2 D0
Op-Code Operand
Example: (i) NOP
(ii) STD
(iii) CLD

CM404.11 7
2. Register to Register

TWO bytes long

D15 D9 D8
Op-Code W

D7 D6 D5 D3 D2 D0
11 REG R/M

EXAMPLE: (1) MOV AX,BX


(2) ADD BX, CX

CM404.11 8
3. Register to/from Memory with no
displacement
TWO bytes long

D15 D9 D8
Op-Code W

D7 D6 D5 D3 D2 D0
MOD REG R/M

EXAMPLE : (1) MOV AX,[SI]


(2) MOV [BX],AX

CM404.11 9
4. Register to/from Memory with
displacement
FOUR bytes long

D31 D25 D24


Op-Code W

D23 D22 D21 D19 D18 D16


MOD REG R/M

D15 D8
Low byte of displacement

D7 D0
High byte of displacement

EXAMPLE: (1) MOV [SI+34H],AX


(2) MOV AX, [BX+8100H]
CM404.11 10
5. Immediate operand to Register
FOUR bytes long
D31 D24
Op-Code

D23 D22 D21 D19 D18 D16


11 Op-Code R/M

D15 D8
Low byte of data

D7 D0
High byte of data

EXAMPLE: (1) MOV AX< 1234H


(2) MOV BX, 8120H
CM404.11 11
6.Immediate operand to Memory
With 16-bit displacement
SIX bytes long

D47 D40 D39 D38 D37 D35 D34 D32

Op-Code MOD Op-Code R/M

D31 D16
16-bit displacement

D15 D0
16-bit data

EXAMPLE : (1) MOV [SI],1234H


(2) MOV [DI],45A2H

CM404.11 12
Summary

• In this class we discussed


– What is Instruction format
– Types
– description

13
Quiz

• Instruction format consists of __________ , ____ fields

opcode, operand

14
Frequently Asked Questions

• Describe the generalized instruction format of 8086

15

You might also like