© 2006 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.

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

Registers of the 8086/ /2002 JNM.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Chapter 2: The Microprocessor and its Architecture.
Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel Microprocessors: 8086/8088, 80186/80188,
Introduction to 8086 Microprocessor
The Microprocessor and its Architecture
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
Azir ALIU 1 What is an assembly language?. Azir ALIU 2 Inside the CPU.
Princess Sumaya University
Operating Systems: Segments 1 Segmentation Hardware Support single user program system: – wish somehow to relocate address 0 to after operating system.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
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 Instructor: Dr. Michael Geiger Spring 2013 Lecture 4: 80386DX memory, addressing.
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.
CEG 320/520: Computer Organization and Assembly Language ProgrammingIntel Assembly 1 Intel IA-32 vs Motorola
An Introduction to 8086 Microprocessor.
Faculty of Engineering, Electrical Department,
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Types of Registers (8086 Microprocessor Based)
INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
(-133)*33+44* *33+44*14 Input device memory calculator Output device controller Control bus data bus memory.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Computers organization & Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR.
ECE291 Computer Engineering II Lecture 3 Dr. Zbigniew Kalbarczyk University of Illinois at Urbana- Champaign.
X86 Assembly Language We will be using the nasm assembler (other assemblers: MASM, as, gas)
1 Microprocessors CSE – 341 EEE – 365 \\server2\tsr\Spring\CSE\CSE341
INTRODUCTION TO INTEL X-86 FAMILY
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
University of Sargodha, Lahore Campus Prepared by Ali Saeed.
AKT211 – CAO 04 – x86 Architecture: Intel 8088 Ghifar Parahyangan Catholic University Sept 19, 2011 Ghifar Parahyangan Catholic University Sept 19, 2011.
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
BITS Pilani Pilani Campus Pawan Sharma Lecture / ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
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.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
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.
Chapter Overview General Concepts IA-32 Processor Architecture
Microprocessor Systems Design I
Difference between Microprocessor and Microcontroller
UNIT Architecture M.Brindha AP/EIE
Introduction to 8086 Microprocessor
8086 Microprocessor.
Chapter 2 The Microprocessor and its Architecture
Basic Microprocessor Architecture
Assembly IA-32.
ADDRESSING MODES.
University of Gujrat Department of Computer Science
Intel 8088 (8086) Microprocessor Structure
Basic of Computer Organization
Microprocessor-Unit I
Chapter 2: The Microprocessor and its Architecture
Introduction to Assembly Language
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
CS 301 Fall 2002 Computer Organization
The Microprocessor & Its Architecture
Assembly Language (CSW 353)
Computer Architecture CST 250
Chapter 2: The Microprocessor and its Architecture
Unit-I 80386DX Architecture
Intel 8086.
Presentation transcript:

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture Barry B. Brey

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Programming Model

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e General-Purpose Registers The top portion of the programming model contains the general purpose registers: EAX, EBX, ECX, EDX, EBP, ESI, and EDI. The top portion of the programming model contains the general purpose registers: EAX, EBX, ECX, EDX, EBP, ESI, and EDI. These registers, although general in nature, each have special purposes and names. These registers, although general in nature, each have special purposes and names. EAX – Accumulator (as general as they come) used also as AX, AH, and AL EAX – Accumulator (as general as they come) used also as AX, AH, and AL EBX – Base Index often used to address memory data (BX, BH, and BL) EBX – Base Index often used to address memory data (BX, BH, and BL)

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e General-Purpose Registers (continued) ECX – count used in shifts and loops (CX, CH, and CL) ECX – count used in shifts and loops (CX, CH, and CL) EDX – data used in multiply and divide (DX, DH, and DL) EDX – data used in multiply and divide (DX, DH, and DL) EBP – base point used to address stack data (BP) EBP – base point used to address stack data (BP) ESI – source index addresses memory data (SI) ESI – source index addresses memory data (SI) EDI – destination index addresses memory data (DI) EDI – destination index addresses memory data (DI)

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Special-Purpose Registers The special purpose register each have specific tasks and are ESP, EIP, and EFLAGS The special purpose register each have specific tasks and are ESP, EIP, and EFLAGS ESP – address stack data used in functions (procedures) and temporary storage (SP) ESP – address stack data used in functions (procedures) and temporary storage (SP) EIP – addresses the next instruction in a program (IP) EIP – addresses the next instruction in a program (IP) EFLAGS – indicates conditions of the microprocessor (FLAGS) EFLAGS – indicates conditions of the microprocessor (FLAGS)

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e EFLAGS

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e The Flags C – holds a carry or a borrow C – holds a carry or a borrow P – the parity flag (little use today) P – the parity flag (little use today) A – auxiliary flag used with DAA and DAS A – auxiliary flag used with DAA and DAS Z – zero Z – zero S – sign S – sign O – Overflow O – Overflow D – direction (used with string instructions) D – direction (used with string instructions) I – interrupt (interrupt on/off) I – interrupt (interrupt on/off) T – trace flag (trace on/off) T – trace flag (trace on/off)

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Newer Flag Bits IOPL – I/O privilege level for Windows IOPL – I/O privilege level for Windows NT – nested task NT – nested task RF – resume flag RF – resume flag VM – virtual mode VM – virtual mode AC – alignment check AC – alignment check VIF – virtual interrupt VIF – virtual interrupt VIP – virtual interrupt pending VIP – virtual interrupt pending ID = CPUID instruction available ID = CPUID instruction available

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Segment Register The segment registers are: CS (code), DS (data), ES (extra), SS (stack), FS, and GS. The segment registers are: CS (code), DS (data), ES (extra), SS (stack), FS, and GS. Segment registers address a section of memory in a program. A segment is either 64K in length (real mode) or up to 4G in length (protected mode). Segment registers address a section of memory in a program. A segment is either 64K in length (real mode) or up to 4G in length (protected mode). All code (programs) reside in the code segment. All code (programs) reside in the code segment.

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Real Mode Memory Addressing Real mode memory is the first 1M of the memory system. Real mode memory is the first 1M of the memory system. All real mode addresses are a combination of a segment address plus an offset address. All real mode addresses are a combination of a segment address plus an offset address. The segment address (16-bits) is appended with a 0H or to form a 20-bit address. (or multiplied by 10H) The segment address (16-bits) is appended with a 0H or to form a 20-bit address. (or multiplied by 10H) The effective address is this 20-bit segment address plus a 16-bit offset address. The effective address is this 20-bit segment address plus a 16-bit offset address.

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Defaults Default 16-bit addresses are programs in CS, stack data in SS, and most other data in a program in DS. Default 16-bit addresses are programs in CS, stack data in SS, and most other data in a program in DS. Default 32-bit addresses are programs in CS, stack data in SS and most other data in DS. Default 32-bit addresses are programs in CS, stack data in SS and most other data in DS. What’s the difference? 16-bit addresses use offset addresses in BX, SI, DI, BP, or an offset numeric value. 32-bit addresses use offset addresses in EAX, EBX, ECX, EDX, EBP, EDI, ESI or a numeric value. What’s the difference? 16-bit addresses use offset addresses in BX, SI, DI, BP, or an offset numeric value. 32-bit addresses use offset addresses in EAX, EBX, ECX, EDX, EBP, EDI, ESI or a numeric value. Programs resides in segment CS addressed by IP/EIP Programs resides in segment CS addressed by IP/EIP Stack data resides segment SS addressed by SP/ESP Stack data resides segment SS addressed by SP/ESP

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Effective Address Calculations EA = segment x 10H plus offset EA = segment x 10H plus offset (a) = (b)ABC34 = AAF (c)21FF0 = FFF0 Example (a) contained 1000 in the segment register, example (b) contained a AAF0 in the segment register, and example (c) contained a 1200 in the segment register.

© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Relocation Segment and offset addressing allows for easy and efficient relocation of code and data. Segment and offset addressing allows for easy and efficient relocation of code and data. To relocate code or data only the segment number needs to be changed. For example, if an instruction appears at offset address 0002 the segment address does not matter because if it changes so does the effective address of he instruction. To relocate code or data only the segment number needs to be changed. For example, if an instruction appears at offset address 0002 the segment address does not matter because if it changes so does the effective address of he instruction.