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

Instruction Set and Assembler Directives

This document discusses the instruction set of the 8086 microprocessor. It begins by introducing the 8086 microprocessor architecture and assembly language programming. It then categorizes the instruction set into different types including data transfer, arithmetic, logical, jump, shift/rotate, and string/string handling instructions. For each type, it provides examples of common instructions such as MOV, ADD, AND, JMP, SHL, and MOVSB. It describes how these instruction types are used to perform operations like moving data, performing arithmetic, logical operations, changing execution flow, shifting bits, and string manipulation.
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
109 views19 pages

Instruction Set and Assembler Directives

This document discusses the instruction set of the 8086 microprocessor. It begins by introducing the 8086 microprocessor architecture and assembly language programming. It then categorizes the instruction set into different types including data transfer, arithmetic, logical, jump, shift/rotate, and string/string handling instructions. For each type, it provides examples of common instructions such as MOV, ADD, AND, JMP, SHL, and MOVSB. It describes how these instruction types are used to perform operations like moving data, performing arithmetic, logical operations, changing execution flow, shifting bits, and string manipulation.
Copyright
© © All Rights Reserved
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/ 19

NEHRU INSTITUTE OF ENGINEERING AND TECHNOLOGY

“Nehru Gardens” T. M. PALAYAM, COIMBATORE-105


(Approved by AICTE and Affiliated to Anna University, Chennai)
(Accredited by NAAC, Recognized by UGC with 2(f) and 12(B))
NBA Accredited UG Courses: AERO, CSE, MECH DEPARTMENT
OF COMPUTER SCIENCE AND ENGINEERING

EC8691 – MICROPROCESSORS AND


MICRO CONTROLLERS
Prepared by
G.Jeevanantham, AP/CSE,
NIET.
UNIT I THE 8086
MICROPROCESSOR

Introduction to 8086 – Microprocessor


architecture – Addressing modes - Instruction
set and assembler directives –
Assembly language programming –
Modular Programming - Linking and
Relocation - Stacks - Procedures – Macros –
Interrupts and interrupt service routines –
Byte and String Manipulation.
INSTRUCTION SET
OF 8086 MICRPOROCESSOR
• The INSTRUCTION set are
categorized into the following
types:
• Data transfer INSTRUCTIONS
• Arithmetic INSTRUCTIONS
• Logical INSTRUCTIONS
• Jump INSTRUCTIONS
• Shift and Rotate
DATA TRANSFER INSTRUCTIONS
• The data transfer instructions are used to
move data between internal registers or
between internal register and the memory.
i)MOV instruction
– MOV instruction is used to transfer data from
source operand to a destination operand
– Examples: MOV CX,DX MOV AX,3025H
DATA TRANSFER INSTRUCTIONS
ii) XCHG instruction
Example:
XCHG BX,AX
III) LEA instruction
Example:
LEA BX,[BETA]
IV) LDS instruction
Example:
LDS SI,[20]
V) LES instruction
Example:
LES DX,[BX]
ARITHMETIC INSTRUCTIONS
• Arithmetic instructions are used to do
arithmetic operation such as
• Addition
• Subtraction
• Multiplication
• Division
ARITHMETIC INSTRUCTIONS
• Addition
Instruction Examples
ADD AL,BL

ADD CX,DI ADC

AX,[BX] INC SP
ARITHMETIC INSTRUCTIONS
• SUBTRACT instruction
Examples
SUB AX, SP SUB DH,6F
SBB AX,BX DEC BH
ARITHMETIC INSTRUCTIONS
• MULTIPLICATION instructions
MUL CL
MUL CX IMUL CL
• DIVISION instructions DIV CL
IDIV SI
LOGICAL INSTRUCTION
• AND instruction
Example
AND AL,BL
• OR instruction
Example
OR SI,DX
• XOR instruction
XOR CH,OE
• NOT instruction
NOT CH
Shift and Rotate Instruction
• SHL instruction
SHL AX,1
• SHR instruction
SHR AX,CL
• ROL instruction
ROL AX,1
• ROR instruction
ROR AX,CL
Jump Instruction
• Jump instruction are used to change the
execution path of instruction in the
program.
i) Unconditional Jump Short Jump
Near Jump Far Jump
ii)Conditional Jump
String and String Handling
Instructions
• Move Operation: Move is a process of
moving a string of data from one Memory
Location to another.
Eg. MOVSB: This instruction moves a byte of
data from one memory location to another.
MOVSW: This instruction moves a word of
data from Source to Destination Operand.
String and String Handling
Instructions
• Compare Operation: Compare is a process of
comparing two elements in the same or
different string.
Eg. COMPSB: This instruction compares a byte
of data from one memory location to another.
COMPSW: This instruction compares a word of
data from one memory location to another.
String and String Handling
Instructions
• SCAN: SCAN is a process of comparing
elements of Destination string with
Accumulator.
Eg. SCASB: This instruction scans a byte of
data from Destination with Accumulator
Register.
SCASW: This instruction scans a word of data
from Destination with Accumulator Register.
String and String Handling
Instructions
• Load Operation: Load is a process of loading
string elements from Memory Location with
Accumulator.
Eg. LODSB: This instruction loads a byte of
data from Memory Location with
Accumulator.
LODSW: This instruction lods a word of data
from Memory Location with Accumulator.
String and String Handling
Instructions
• Store Operations: Store is a process of moving
string of elements from Accumulator to
Memory Location.
Eg.STOSB: This instruction stores a byte of
data from Accumulator to Memory Location.
STOSW: This instruction stores a word of data
from Accumulator to Memory Location.
String and String Handling
Instructions
• AUTO INDEXING: Auto Indexing is a
process of Incrementing or Decrementing the
content of Source Index or Destination Index.
Eg.CLD: When this instruction is executed
Direction Flag is cleared to zero. Now Auto
Incrementing Source Index or Destination
Index takes place.
Thank
You

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