Social Sciences, asked by bismapari6669, 1 year ago

Instruction set of 8086 microprocessor with examples

Answers

Answered by kshytizNES
7
Instruction Set of 8086


The 8086 instructions are categorized into the following main types.
i. Data Copy / Transfer Instructions
ii. Arithmetic and Logical Instructions
iii. Branch Instructions
iv. Loop Instructions
v. Machine Control Instructions
vi. Flag Manipulation Instructions
vii. Shift and Rotate Instructions
viii. String Instructions


Data Copy / Transfer Instructions :
MOV :

This instruction copies a word or a byte of data from some source to a destination. The destination can be a register or a memory location. The source can be a register, a memory location, or an immediate number.
MOV AX,BX
MOV AX,5000H
MOV AX,[SI]
MOV AX,[2000H]
MOV AX,50H[BX]
MOV [734AH],BX
MOV DS,CX
MOV CL,[357AH]
Direct loading of the segment registers with immediate data is not permitted.

PUSH : Push to Stack

This instruction pushes the contents of the specified register/memory location on to the stack. The stack pointer is decremented by 2, after each execution of the instruction.
E.g. PUSH AX
• PUSH DS
• PUSH [5000H]



POP : Pop from Sack


This instruction when executed, loads the specified register/memory location with the contents of the memory location of which the address is formed using the current stack segment and stack pointer.
The stack pointer is incremented by 2
Eg. POP AX
POP DS
POP [5000H]



XCHG : Exchange byte or word

This instruction exchange the contents of the specified source and destination operands
Eg. XCHG [5000H], AX
XCHG BX, AX

XLAT :

Translate byte using look-up table
Eg. LEA BX, TABLE1
MOV AL, 04H
XLAT
Simple input and output port transfer Instructions:

IN:


Copy a byte or word from specified port to accumulator.
Eg. IN AL,03H
IN AX,DX

OUT:

Copy a byte or word from accumulator specified port.
Eg. OUT 03H, AL
OUT DX, AX

LEA :

Load effective address of operand in specified register.[reg] offset portion of address in DS
Eg. LEA reg, offset

LDS:

Load DS register and other specified register from memory.
[reg] [mem]
[DS] [mem + 2]
Eg. LDS reg, mem

LES:

Load ES register and other specified register from memory.
[reg] [mem]
[ES] [mem + 2]
Eg. LES reg, mem


Similar questions