Data transfer instructions of 8086 microprocessor

Posted By on September 15, 2014


Download PDF
8086 Instruction Set
Arithematic Instructions set

Data copy or transfer instructions

 
MOV
This instruction copies a word or a byte of data from some source to a destination. This destination can be a register or a memory location. The source can be a register, a memory location or an immediate number.
Example
 
MOV AX,BX
MOV AX,500H
MOV AX,[SI]
MOV AX,[2000H]
MOV AX,50H[BX]
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 this instruction.
Example
PUSH AX
PUSH DX
PUSH [5000H]
POP : Pop from stack
 
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.
Example
POP AX
POP DS
POP [5000H]
XCHG : Exchange byte or word
This instruction exchange the contentrs of a specified source and destination operands
Example
XCHG [5000H], AX
XCHG BX,AX
XLAT 
Translate byte using look up table
Example
LEA BX, TABLE1
MOV AL, 04H
XLAT
Simple input and output port transfer instructions
IN : Copy a byte or word from a specified port to accumulator.
Example
IN AL, 03H
IN AX, DX
OUT: Copy a byte or word from accumulator specified port.
Example
OUT 03H, AL
OUT DX, AX
LEA : Load effective address of the operands in specified register.
Eg.
LEA reg, offset
LDS : Load DS register with 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]
[reg] [mem +2]
Eg.
LES reg, mem
 
FLAG TRANSFER INSTRUCTIONS
 
LAHF
Load AH with the low byte of the flag register.
[AH] <—- [Flags low byte]
Eg LAHF
SAHF
Store AH register to low byte of flag register.
[Flags low byte] <—- [AH]
Eg. SAHF
PUSHF
Copy flag register to top of stack.
[SP] <—- [SP]-2
[[SP]] <— [ Flags]
Eg. PUSHF
POPF
Copy word at top of stack to flag register.
[Flags] <—- [[SP]]
[SP] <— [SP+2]

8086 Instruction Set
Arithematic Instructions set

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com