Chapter 4 Data Movement Instructions

Slides:



Advertisements
Similar presentations
Register In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than.
Advertisements

Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions.
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
There are two types of addressing schemes:
For the example slides do not click the mouse to see the full animation Microprocessor 1 Dr.Raed Al-qadi 2009 for the example slides do not click the mouse.
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
80x86 Instruction Set Dr. Qiang Lin.
Gursharan Singh Tatla 21-Nov-20101www.eazynotes.com.
8086 : INSTRUCTION SET By, Pramod Sunagar Assistant Professor
8-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 4 Data Movement Instructions by.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Microcomputer & Interfacing Lecture 3
Topic – string – Ch. 11 [Marut] Ch. 4 [Brey] String Data Transfer Instructions – The Direction Flag – LODS Instructions – STOS Instructions – MOVS Instructions.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Lect 4: Instruction Set and Addressing Modes. 386 Instruction Set (3.4)  Basic Instruction Set : 8086/8088 instruction set  Extended Instruction Set.
CDP ECE Spring 2000 ECE 291 Spring 2000 Lecture 7: More on Addressing Modes, Structures, and Stack Constantine D. Polychronopoulos Professor, ECE.
3.7 String Instructions Specifying the Operands’ Size and Address and the String Direction STRING = a data collection in memory. String ELEMENTS can be:
Lecture 13 Basic I/O Interface
11.1/36 Repeat: From Bits and Pieces Till Strings.
Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
ICS312 Lecture13 String Instructions.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
Addressing Modes of 8086 Processor Ammar Anwar Khan Electrical Engineer King Saud University Riyadh Saudi Arabia.
Click to add Title Comunicación y Gerencia Click To add Subtitle Click to add Text Fundamentals of Assembly Language.
String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures.
String Processing Chapter 10 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures.
Assembly Language Data Movement Instructions. MOV Instruction Move source operand to destination mov destination, source The source and destination are.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Khaled A. Al-Utaibi  Introduction  The MOV Instruction  The LEA Instruction  The Stack Instructions  The String Data Transfer.
Lecture 6 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Chapter 8 String Operations. 8.1 Using String Instructions.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
1 Computer Architecture & Assembly Language Spring 2001 Dr. Richard Spillman Lecture 10 –Assembly V.
Lecture 2 Programming of 8086 Лектор: Люличева И.А. 1.
Chapter Nov-2010
Presentation on Real Mode Memory Addressing
Assembly 07 String Processing.
Introduction to 8086 Microprocessor
BYTE AND STRING MANIPULATON
Computer Organization & Assembly Language Chapter 3
Today we are going to discuss about,
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
Chapter six of V4: The String Instructions
ADDRESSING MODES.
Chapter 2 The Microprocessor and its Architecture
Chapter 4 Data Movement Instructions
EE3541 Introduction to Microprocessors
INSTRUCTION SET.
Assembly Language Programming Part 2
ADDRESSING MODES.
Chapter 3 Addressing Modes
Symbolic Instruction and Addressing
3.6 Data transfer Instructions
8086 MICROPROCESSOR PROGRAMMING – INTEGER INSTRUCTIONS AND COMPUTATIONS Amar Saraswat.
8086 Registers Module M14.2 Sections 9.2, 10.1.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
32-bit instruction mode(80386-Pentium 4 only)
Symbolic Instruction and Addressing
Symbolic Instruction and Addressing
Assembly Language for Intel-Based Computers, 5th Edition
T opic: S TRING I NSTRUCTION P RESENTED B Y: N OOR FATIMA M AHA AKRAM ASIF.
Lecture 06 Programming language.
Data Movement Instructions
Chapter 6 –Symbolic Instruction and Addressing
CNET 315 Microprocessor & Assembly Language
Presentation transcript:

Chapter 4 Data Movement Instructions Asst. Prof. Dr. Gazi Erkan BOSTANCI Slides are mainly based on The Intel Microprocessors by Barry B. Brey, 2008

mov, push, pop sample

LEA: Loads a 16 or 32 bit register with the offset address of the data specified by the operand. LEA BX, [DI]; loads the offset address specified by [DI], contents of DI into BX register. MOV BX, [DI]; loads the data stored at the memory location addressed by [DI] into register BX MOV BX, OFFSET DATA1; the same as LEA BX, DATA1

LDS: Loads any 16 or 32 bit register with an offset address and the DS segment register with a segment address. LDS BX, [DI]; Transfers the 32 bit number addressed by DI in the data segment into BX and DS registers

LODS: Loads AL or AX with data stored at the data segment offset address indexed by the SI register LODSB -> AL = DS:[SI] SI = SI ± 1 LODSW -> AX = DS:[SI] SI = SI ± 2 Note that the increment or decrement operation on the SI is decided by the value of the D (direction) flag. STD for setting (D=1 -> decrement) CLD for clearing (D=0 -> increment)

Same applies to DI for this instruction. STOS: Stores AL or AX at the extra segment memory location addressed by the DI register. STOSB ->ES:[DI] = AL DI = DI ± 1 STOSW -> ES:[DI] = AX DI = DI ± 2 Same applies to DI for this instruction.

MOVS: Transfers a byte, word or doubleword from the data segment location addressed by SI to the extra segment location addressed by DI. MOVSB -> ES:[DI] = DS:[SI] ;(byte transfer) DI = DI ± 1 SI = SI ± 1 MOVSW -> ES:[DI] = DS:[SI] ;(word transfer) DI = DI ± 2 SI = SI ± 2 MOVSD -> ES:[DI] = DS:[SI] ;(double word transfer) DI = DI ± 4 SI = SI ± 4

XCHG: Exchanges the contents of a register with the contents of any other register or memory location. It cannot Exchange segment registers or memory-to-memory data. XCHG AL, CL; Exchanges the contents of AL and CL XCHG AL, DATA2; Exchanges the contents of AL with the data segment memory location DATA2

XLAT: Converts the contents of the AL register into a number stored in a memory table. This is used to convert a BCD number into 7-segment code. -gfe dcba -> 3FH 0011 1111 1 06H 0000 0110 2 5BH 0101 1011

IN and OUT: Perform I/O operations. In instruction transfers data from an external I/O device into AL or AX. Out instruction transfers data from AL or AX to an external I/O device. IN AL, p8; 8bits are input to AL from I/O port p8. IN AX, p8; 16 bits are input to AX from I/O port p8. OUT p8, AL, 8 bits are output to I/O port p8. OUT DX, AX; 16 bits are output to I/O port DX from AX. Fixed port addressing Variable port addressing: The port number is stored in DX, and can be changed during the program execution.