32-bit instruction mode(80386-Pentium 4 only)

Slides:



Advertisements
Similar presentations
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Advertisements

COMP 2003: Assembly Language and Digital Logic
Department of Computer Science and Software Engineering
Chapter 3 Addressing Modes
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
Stack Memory H H FFFFF H FFFFE H SS 0105 SP 0008 TOS BOS BOS = FFFF = 1104F H H 1104F H.
Data Movement Instructions
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
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.
Microprocessor Systems Design I
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 4: x86 memory.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Topic – string – Ch. 11 [Marut] Ch. 4 [Brey] String Data Transfer Instructions – The Direction Flag – LODS Instructions – STOS Instructions – MOVS Instructions.
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.
Low Level Programming Lecturer: Duncan Smeed Overview of IA-32 Part 1.
INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
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.
(-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.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
ECE291 Computer Engineering II Lecture 3 Dr. Zbigniew Kalbarczyk University of Illinois at Urbana- Champaign.
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.
MOV Instruction MOV destination,source  MOV AX,BX  MOV SUM,EAX  MOV EDX,ARRAY[EBX][ESI]  MOV CL,5  MOV DL,[BX]
Data Transfer Instructions Introduction The data transfer instructions are used to move data between internal register or between internal.
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.
Lecture 6 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
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.
Computer Science 516 Intel x86 Overview. Intel x86 Family Eight-bit 8080, 8085 – 1970s 16-bit 8086 – was internally 16 bits, externally 8 bits.
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
Homework Reading Lab with your assigned section starts next week
UNIT–II 8086 Family Assembly Language Programming
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
ADDRESSING MODES.
Microprocessor Systems Design I
Chapter 4 Data Movement Instructions
EE3541 Introduction to Microprocessors
Assembly IA-32.
ADDRESSING MODES.
Assembly Lang. – Intel 8086 Addressing modes – 1
Subject Name: MICROPROCESSORS Subject Code:10CS45
Symbolic Instruction and Addressing
BIC 10503: COMPUTER ARCHITECTURE
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
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
Symbolic Instruction and Addressing
CS 301 Fall 2002 Computer Organization
Chapter 3: Addressing Modes
The Microprocessor & Its Architecture
Symbolic Instruction and Addressing
CNET 315 Microprocessor & Assembly Language
Computer Architecture CST 250
EECE.3170 Microprocessor Systems Design I
Data Movement Instructions
Chapter 6 –Symbolic Instruction and Addressing
Presentation transcript:

32-bit instruction mode(80386-Pentium 4 only) Machine Language 16-bit instruction mode Opcode 1-2 bytes MOD-REG-R/M 0-1 bytes Displacement 0-1 bytes Immediate 0-2 bytes 32-bit instruction mode(80386-Pentium 4 only) Address size 0-1 bytes Register size 0-1 bytes Opcode 1-2 bytes MOD-REG-R/M 0-1 bytes Scaled-index 0-1 bytes Displacement 0-4 bytes Immediate 0-4 bytes

The Opcode D W Opcode D=1 data flow to register field from R/M field. D=0 data flow to the R/M field from register field. W=1 data size is a word or doubleword. W=0 data size is a byte.

Example: Suppose that a two-byte instruction MOD REG R/M MOD Function 00 No displacement 01 8-bit sign-extended displacement 10 16-bit signed displacement 11 R/M is a register For MOD=11:- Code W=0 W=1(word) w=1(DW) 000 AL AX EAX 001 CL CX ECX 010 DL DX EDX 011 BL BX EBX 100 AH SP ESP 101 CH BP EBP 110 DH SI ESI 111 BH DI EDI Example: Suppose that a two-byte instruction 8BECH 1 Opcode D W MOD REG R/M

Example: Suppose that a two-byte For MOD= 00, 01, 10:- R/M Code Addressing Mode 000 DS:[BX+SI] 001 DS:[BX+DI] 010 SS:[BP+SI] 011 SS:[BP+DI] 100 DS:[SI] 101 DS:[DI] 110 SS:[BP]* 111 DS:[BX] Example: Suppose that a two-byte Instruction 8A15H 1 Opcode D W MOD REG R/M

Movement Instructions PUSH/POP LEA : load a 16- or 32- bit register with the offset address of the data specified by the operand. LEA AX,NUMB LEA EAX,NUMB LDS, LES, LFS, LGS, and LSS : load any 16- or 32-bit register with an offset address and the DS, ES, FS, GS, or SS segment register with a segment address. LDS BX,[DI] LDS EBX,[DI]

STRING DATA TRANSFER LODS : loads AL, AX, or EAX with data stored at the data segment, offset address indexed by the SI register. LODSB AL=DS:[SI]; SI=SI±1 STOS :stores AL, AX, or EAX at the extra segment memory location addressed by the DI register. STOSB ES:[DI]=AL: DI=DI±1 The repeat prefix : is add to any string data transfer instruction except the LODS. REP STOSW ES:[DI]=AX: DI=DI±2, CX=CX-1

MOVS : it transfers data from one memory location to another (8086-p4). Transfers a B, W, or D from data segment location addressed by SI to extra segment location addressed by DI. MOVSB ES:[DI]=DS:[SI]; DI=DI±1, SI=SI±1 4. INS : (not available on the 8086/8088) transfer a B, W, or D of data from I/O device into the extra segment memory location addressed by the DI register. Note that the I/O address is contained in the DX register. INSD ES:[DI]=[DX]; DI=DI±4 5. OUTS : (not available on the 8086/8088) transfer a B, W, or D of data from the data segment location addressed by SI to an I/O device. OUTSW [DX]=DS:[SI]; SI=SI±2

MISCELLANEOUS DATA TRANSFER Instructions 1. XCHG: exchanges the contents of a register with the contents of any other register or memory location. XCHG AX,CX exchanges the contents of AX with CX Byte, word, or doubleword – size. Use any addressing mode except immediate addressing. Segment registers. Memory to memory. LAHF: transfers the rightmost eight bits of the flag register into the AH register. SAHF : transfers the AH register to the rightmost eight bits of the flag register.

XLAT: converts the contents of the AL register into a number stored in a memory table. 5. IN and OUT: the content of AL, AX, or EAX are transferred only between the I/O device and the µP. IN: transfers data from an external I/O device into AL, AX, or EAX. OUT: transfers data from AL, AX, or EAX to an external I/O device. IN AX,p8 IN AL,DX OUT p8,AL OUT DX,EAX

MOVSX: (move and sign – extend) convert 8- or 16-bits signed numbers into 16- or 32-bit signed number (80386-P4). MOVSX CX,BL BL=84H, CX=FF84H MOVZX: (move and zero – extend) convert unsigned 8- or 16-bits numbers into unsigned 16- or 32-bit number (80386-P4). MOVZX DX,AL AL=34H, DX=0034H 8. BSWAP EAX EAX=55667788H EAX=88776655H CMOV:( conditional move) is new to the Pentium-Pro- P4. CMOVC move if carry