SlideShare a Scribd company logo
1 of 17
8086 Instruction Set
8086 Instruction Set
Sequential control flow instructions
• After execution transfers the control to the next instruction
appearing immediately after it (in sequence)
• Example: Arithmetic, data transfer, logical, processor control,
bit manipulation,
Control transfer instructions
• After execution transfers the control to some predefined or to
the address somehow specified in the instruction
8086 Instruction Set
Categories
a. Data copy/Transfer
b. Arithmetic and Logical
c. Branch
d. Loop
e. Machine Control
f. Flag Manipulation
g. Shift and Rotate
h. String
Data Copy/Transfer Instructions
MOV AX,5000H IMMEDIATE
MOV AX,BX REGISTER
MOV AX,[SI] INDIRECT
MOV AX,[2000H] DIRECT
MOV AX,50H[BX] BASED RELATIVE, 50H DISPLACEMENT
PUSH AX POP AX
PUSH DX POP DX
PUSH [5000H] POP [5000H]
PUSHF POPF
XCHG [5000H], AX XCHG BX,AX
14 Instructions
Data Copy/Transfer Instructions
• IN
• IN destination, source : reads the port
– Destination: AX or AL
– Source: address of the port (16 bit address must be in DX,
8 bit address specified in the instruction)
Examples:
IN AL,03H : AL  [03H]
IN AX,DX : AX  [DX]
MOV DX, 0800H
IN AX, DX : AX  [0800H]
• OUT destination, source : writing to the port
– Destination: address of the port (16 bit address must be in
DX, 8 bit address specified in the instruction)
– Source: AX or AL
– Odd address port data on higher data bus
– Even address port data on lower data bus
– Examples:
OUT 03H,AL
OUT DX, AX
MOV DX, 7000H
OUT DX, AX
• LEA destination, source : load effective address (offset)
– Destination: any register which can hold the offset address
– i.e.
– Source: operand name
Examples:
LEA BX, A : BX  offset of variable A
LEA SI, A[BX] : SI  offset of variable A + BX
Data Copy/Transfer Instructions
• OUT
Data Copy/Transfer Instructions
• LEA
DATA SEGMENT
A1 DW -9852H
A2 DW -0147H
B DW 2222H
QUO DW ?
REM DW ?
DATA ENDS
Data Copy/Transfer Instructions
• LES/ LDS BX, add16
– Loads the pointer to DS or ES
– Starting with the address mentioned in the instruction two
bytes are copied to BX and next two bytes are copied to ES
or DS. (1st byte to BL, 2nd byte to BH, 3rd byte to lower byte
and 4th byte to higher byte of DS/ ES )
– Examples:
– LES BX, 5000H
– LDS BX, 5000H
XY 5000H
LM 5001H
WZ 5002H
JK 5003H
LDS BX,5000H or LES BX,5000H
BH BL
LM XY
Higher byte of DS/ES Lower byte of DS/ES
JK WZ
• 0000h: 45h
• 0001h: 78h
• 0002h: a3h
• 0003h: 90h
• LDS BX,0000h
• bx:
• ds:
Data Copy/Transfer Instructions
• LAHF : load AH from lower byte of Flag
AH  lower byte of flag
• SAHF : store AH to lower byte of Flag
Lower byte of flag  AH
Data Copy/Transfer Instructions
• XLAT : translate
– Can be used for look up table
– Default source & destination operand is AL
– Default base address of look up table is in BX
– Physical address in look up table = 10H * DS + AL + BX
– Example:
MOV AL, NUM ; read the number
MOV BX, OFFSET_TABLE ; store the base address of look up
table
XLAT
Data Copy/Transfer Instructions
SQR_TABLE DB 00, 01, 04, 09, 16, 25, 36, 49, 64, 81
LEA BX, SQR_TABLE
MOV AL, 03H
XLAT
after execution AL = 09h
XLAT = MOV AL, AL[BX]
AL  [10H*DS + AL + BX]
DEC AL
XLAT
AL=??

More Related Content

Similar to Chap3 8086 data transfer

Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction setedwardkiwalabye1
 
Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.pptinian2
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086techbed
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Instructionsetof8085 120415220437-phpapp02
Instructionsetof8085 120415220437-phpapp02Instructionsetof8085 120415220437-phpapp02
Instructionsetof8085 120415220437-phpapp02Satsang Yadav
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)Ravi Anand
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086Vijay Kumar
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)AmitPaliwal20
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptxNishatNishu5
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorpal bhumit
 
8086 Micro-processor and MDA 8086 Trainer Kit
8086 Micro-processor and MDA 8086 Trainer Kit8086 Micro-processor and MDA 8086 Trainer Kit
8086 Micro-processor and MDA 8086 Trainer KitAmit Kumer Podder
 

Similar to Chap3 8086 data transfer (20)

Intrl 8086 instruction set
Intrl 8086 instruction setIntrl 8086 instruction set
Intrl 8086 instruction set
 
Notes all instructions
Notes all instructionsNotes all instructions
Notes all instructions
 
Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
 
Instructionsetof8085 120415220437-phpapp02
Instructionsetof8085 120415220437-phpapp02Instructionsetof8085 120415220437-phpapp02
Instructionsetof8085 120415220437-phpapp02
 
8086 alp
8086 alp8086 alp
8086 alp
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)
 
8086 add mod
8086 add mod8086 add mod
8086 add mod
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 
Addressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessorAddressing mode of 80286 microprocessor
Addressing mode of 80286 microprocessor
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8086 Micro-processor and MDA 8086 Trainer Kit
8086 Micro-processor and MDA 8086 Trainer Kit8086 Micro-processor and MDA 8086 Trainer Kit
8086 Micro-processor and MDA 8086 Trainer Kit
 
Chapter3 8086inst logical 2
Chapter3 8086inst logical 2Chapter3 8086inst logical 2
Chapter3 8086inst logical 2
 
Chap3 8086 logical
Chap3 8086 logicalChap3 8086 logical
Chap3 8086 logical
 

More from HarshitParkar6677 (20)

Wi fi hacking
Wi fi hackingWi fi hacking
Wi fi hacking
 
D dos attack
D dos attackD dos attack
D dos attack
 
Notes chapter 6
Notes chapter  6Notes chapter  6
Notes chapter 6
 
Interface notes
Interface notesInterface notes
Interface notes
 
Chapter6 2
Chapter6 2Chapter6 2
Chapter6 2
 
Chapter6
Chapter6Chapter6
Chapter6
 
8086 cpu 1
8086 cpu 18086 cpu 1
8086 cpu 1
 
Chapter 6 notes
Chapter 6 notesChapter 6 notes
Chapter 6 notes
 
Chapter 5 notes
Chapter 5 notesChapter 5 notes
Chapter 5 notes
 
Chap6 procedures & macros
Chap6 procedures & macrosChap6 procedures & macros
Chap6 procedures & macros
 
Chapter 5 notes new
Chapter 5 notes newChapter 5 notes new
Chapter 5 notes new
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
 
Notes aaa aa
Notes aaa aaNotes aaa aa
Notes aaa aa
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
Misc
MiscMisc
Misc
 
Chapter3 program flow control instructions
Chapter3 program flow control instructionsChapter3 program flow control instructions
Chapter3 program flow control instructions
 
Chapter3 8086inst stringsl
Chapter3 8086inst stringslChapter3 8086inst stringsl
Chapter3 8086inst stringsl
 
Chapter 3 8086 ins2 math
Chapter 3 8086 ins2 mathChapter 3 8086 ins2 math
Chapter 3 8086 ins2 math
 
Chap3 program flow control instructions
Chap3 program flow control instructionsChap3 program flow control instructions
Chap3 program flow control instructions
 
Chap3 8086 artithmetic
Chap3 8086 artithmeticChap3 8086 artithmetic
Chap3 8086 artithmetic
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 

Chap3 8086 data transfer

  • 2. 8086 Instruction Set Sequential control flow instructions • After execution transfers the control to the next instruction appearing immediately after it (in sequence) • Example: Arithmetic, data transfer, logical, processor control, bit manipulation, Control transfer instructions • After execution transfers the control to some predefined or to the address somehow specified in the instruction
  • 3. 8086 Instruction Set Categories a. Data copy/Transfer b. Arithmetic and Logical c. Branch d. Loop e. Machine Control f. Flag Manipulation g. Shift and Rotate h. String
  • 4. Data Copy/Transfer Instructions MOV AX,5000H IMMEDIATE MOV AX,BX REGISTER MOV AX,[SI] INDIRECT MOV AX,[2000H] DIRECT MOV AX,50H[BX] BASED RELATIVE, 50H DISPLACEMENT PUSH AX POP AX PUSH DX POP DX PUSH [5000H] POP [5000H] PUSHF POPF XCHG [5000H], AX XCHG BX,AX 14 Instructions
  • 6. • IN destination, source : reads the port – Destination: AX or AL – Source: address of the port (16 bit address must be in DX, 8 bit address specified in the instruction) Examples: IN AL,03H : AL  [03H] IN AX,DX : AX  [DX] MOV DX, 0800H IN AX, DX : AX  [0800H]
  • 7. • OUT destination, source : writing to the port – Destination: address of the port (16 bit address must be in DX, 8 bit address specified in the instruction) – Source: AX or AL – Odd address port data on higher data bus – Even address port data on lower data bus – Examples: OUT 03H,AL OUT DX, AX MOV DX, 7000H OUT DX, AX
  • 8. • LEA destination, source : load effective address (offset) – Destination: any register which can hold the offset address – i.e. – Source: operand name Examples: LEA BX, A : BX  offset of variable A LEA SI, A[BX] : SI  offset of variable A + BX
  • 11. DATA SEGMENT A1 DW -9852H A2 DW -0147H B DW 2222H QUO DW ? REM DW ? DATA ENDS
  • 12. Data Copy/Transfer Instructions • LES/ LDS BX, add16 – Loads the pointer to DS or ES – Starting with the address mentioned in the instruction two bytes are copied to BX and next two bytes are copied to ES or DS. (1st byte to BL, 2nd byte to BH, 3rd byte to lower byte and 4th byte to higher byte of DS/ ES ) – Examples: – LES BX, 5000H – LDS BX, 5000H
  • 13. XY 5000H LM 5001H WZ 5002H JK 5003H LDS BX,5000H or LES BX,5000H BH BL LM XY Higher byte of DS/ES Lower byte of DS/ES JK WZ
  • 14. • 0000h: 45h • 0001h: 78h • 0002h: a3h • 0003h: 90h • LDS BX,0000h • bx: • ds:
  • 15. Data Copy/Transfer Instructions • LAHF : load AH from lower byte of Flag AH  lower byte of flag • SAHF : store AH to lower byte of Flag Lower byte of flag  AH
  • 16. Data Copy/Transfer Instructions • XLAT : translate – Can be used for look up table – Default source & destination operand is AL – Default base address of look up table is in BX – Physical address in look up table = 10H * DS + AL + BX – Example: MOV AL, NUM ; read the number MOV BX, OFFSET_TABLE ; store the base address of look up table XLAT
  • 17. Data Copy/Transfer Instructions SQR_TABLE DB 00, 01, 04, 09, 16, 25, 36, 49, 64, 81 LEA BX, SQR_TABLE MOV AL, 03H XLAT after execution AL = 09h XLAT = MOV AL, AL[BX] AL  [10H*DS + AL + BX] DEC AL XLAT AL=??