Data Movement Instructions

Slides:



Advertisements
Similar presentations
Judul Mata Kuliah Judul Pokok Bahasan 1/total Data Movement Instructions.
Advertisements

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:
6-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 Addressing modes.
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
Data Movement Instructions
Introduction to Computer Engineering by Richard E. Haskell Register Indirect Addressing Module M18.2 Section 12.3.
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.
80x86 Processor Architecture
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 4: x86 memory.
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.
The 8086 Microprocessor The 8086, announced in 1978, was the first 16-bit microprocessor introduced by Intel Corporation 8086 is 16-bit MPU. Externally.
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:
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.
(-133)*33+44* *33+44*14 Input device memory calculator Output device controller Control bus data bus memory.
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.
Addressing Modes. Addressing Mode The data is referred as operand. The operands may be contained in registers, memory or I/O ports, within the instruction.
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.
Khaled A. Al-Utaibi  Introduction  The MOV Instruction  The LEA Instruction  The Stack Instructions  The String Data Transfer.
Internal Programming Architecture or Model
Lecture 6 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Data Movement Instructions A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Chapter Nov-2010
Presentation on Real Mode Memory Addressing
Microprocessor Systems Design I
Microprocessor Systems Design I
Assembly 07 String Processing.
UNIT–II 8086 Family Assembly Language Programming
Introduction to 8086 Microprocessor
BYTE AND STRING MANIPULATON
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
Chapter six of V4: The String Instructions
ADDRESSING MODES.
Chapter 4 Data Movement Instructions
EE3541 Introduction to Microprocessors
INSTRUCTION SET.
ADDRESSING MODES.
University of Gujrat Department of Computer Science
Chapter 3 Addressing Modes
Subject Name: MICROPROCESSORS Subject Code:10CS45
Defining Types of data expression Dn [name] expression Dn [name]
Symbolic Instruction and Addressing
Data Addressing Modes • MOV AX,BX; This instruction transfers the word contents of the source-register(BX) into the destination register(AX). • The source.
3.6 Data transfer Instructions
University of Gujrat Department of Computer Science
8086 MICROPROCESSOR PROGRAMMING – INTEGER INSTRUCTIONS AND COMPUTATIONS Amar Saraswat.
Chapter 4 Data Movement Instructions
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
The Microprocessor & Its Architecture
Symbolic Instruction and Addressing
T opic: S TRING I NSTRUCTION P RESENTED B Y: N OOR FATIMA M AHA AKRAM ASIF.
Computer Architecture CST 250
Unit-I 80386DX Architecture
Chapter 6 –Symbolic Instruction and Addressing
Presentation transcript:

Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University 17 Agustus 1945 Jakarta

Load-Effective Address There are several LEA instructions in p Table 4.9 lists the LEA instructions LEA The LEA instruction loads a 16- or 32- bit register with the offset address of the data specified by the operand E.g., LEA AX,NUMB Compare: LEA BX,[DI] & MOV BX,[DI] Understand Example 4.3

Load-Effective Address (cont’d) LDS, LES, LFS, LGS, LSS The LDS, LES, LFS, LGS, LSS instructions load any 16- or 32-bit register with an offset address and load the DS, ES, FS, GS, or SS segment register with a segment address Fig. 4.15 illustrates an example LDS BX,[DI] instruction this instruction transfers the 32-bit number, address-ed by DI in the data segment, into the BX and DS registers Study Example 4.4

String Data Transfers There are 5 string data transfer instructions: LODS, STOS, MOVS, INS, and OUTS The Direction Flag The direction flag (D) -located in the flag register- selects the auto-increment (D=O) or the auto-decrement (D=1) operation for the DI and SI registers during string operations The CLD instruction clears the D flag (D=0), and the STD instruction sets it (D=1)

String Data Transfers (cont’d) DI and SI The DI offset address accesses data in the extra segment for all string instructions that use it The SI offset address accesses data, by default, in the data segment LODS The LODS instruction loads AL, AX, or EAX with data stored at the data segment offset address indexed by the SI register (Table 4.10)

String Data Transfers (cont’d) Fig.4.16 shows the effect of executing the LODSW instruction if the D flag=0, SI=1000H, and DS=1000H STOS The STOS instruction stores AL, AX, or EAX at the extra segment memory location addressed by the DI register Table 4.11 lists all forms of STOS instructions The STOSB (stores a byte), STOSW (stores a word) and STOSD (stores a doubleword)

String Data Transfers (cont’d) In example 4.5 STOSW instruction is used to clear the video text display MOVS MOVS instruction transfers data (either byte, word or doubleword) from one memory loca-tion to another (Table 4.13) MOVS transfers data from the data segment location addressed by SI to the extra segment location addressed by DI Example 4.6 lists a short program that uses MOVS

String Data Transfers (cont’d) INS The INS (input string) instruction transfers data from an I/O device into extra segment memory location addressed by the DI register The I/O address is contained in the DX register See Table 4.14 and Study example 4.7 OUTS The OUTS (output string) transfers data from the data segment location addressed by SI to an I/O device (addressed by DX) -- Table 4.15 & Example 4.8