Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.

Slides:



Advertisements
Similar presentations
Registers of the 8086/ /2002 JNM.
Advertisements

Computer Organization and Assembly Language
Computer Organization and Assembly Languages Yung-Yu Chuang
CS2422 Assembly Language & System Programming September 19, 2006.
IA-32 Architecture Computer Organization &
IA-32 Processor Architecture
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Assembly Language for Intel-Based Computers Chapter 5: Procedures Kip R. Irvine.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
© 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, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
IA-32 Architecture COE 205 Computer Organization and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University.
Assembly Language for Intel-Based Computers, 4th Edition
Assembly Language Basic Concepts IA-32 Processor Architecture.
CS2422 Assembly Language & System Programming September 22, 2005.
IA-32 Architecture COE 205 Computer Organization and Assembly Language Computer Engineering Department King Fahd University of Petroleum and Minerals.
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 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers, Stack Operations Runtime Stack PUSH Operation POP.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
The 8086 Microprocessor The 8086, announced in 1978, was the first 16-bit microprocessor introduced by Intel Corporation 8086 is 16-bit MPU. Externally.
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
An Introduction to IA-32 Processor Architecture Eddie Lopez CSCI 6303 Oct 6, 2008.
Assembly Language for Intel-Based Computers, 5th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Assembly Language for x86 Processors 6th Edition
Irvine, Kip R. Assembly Language for x86 Processors 6/e, IA-32 Processor Architecture Modes of operation Basic execution environment Floating-point.
Chapter 2: IA-32 Processor Architecture. Chapter Overview General Concepts IA-32 Processor Architecture IA-32 Memory Management Components of an IA-32.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved.
Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You may modify and copy this slide show for your personal.
Assembly Language Basic Concepts IA-32 Processor Architecture.
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
CEG 320/520: Computer Organization and Assembly Language ProgrammingIntel Assembly 1 Intel IA-32 vs Motorola
An Introduction to 8086 Microprocessor.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
Assembly Language for x86 Processors 7th Edition
1 ICS 51 Introductory Computer Organization Fall 2009.
Assembly Language for x86 Processors 6 th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, All rights reserved. You may modify.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Computers organization & Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR.
Sahar Mosleh California State University San MarcosPage 1 Intel IA-32 Architecture This lecture describes the architecture of the Intel IA-32 processor.
X86 Assembly Language We will be using the nasm assembler (other assemblers: MASM, as, gas)
INTRODUCTION TO INTEL X-86 FAMILY
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
Intel 8086 MICROPROCESSOR ARCHITECTURE
BITS Pilani Pilani Campus Pawan Sharma Lecture / ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Chapter Overview General Concepts IA-32 Processor Architecture
Assembly language.
x86 Processor Architecture
Assembly Language for Intel-Based Computers, 5th Edition
8086 Microprocessor.
Assembly Language for Intel-Based Computers, 5th Edition
Basic Microprocessor Architecture
Assembly Language for Intel-Based Computers, 4th Edition
Basic of Computer Organization
COAL Chapter 1,2,3.
CS 301 Fall 2002 Computer Organization
Assembly Language (CSW 353)
Computer Architecture CST 250
Assembly Language for Intel-Based Computers, 5th Edition
Computer Architecture and System Programming Laboratory
Presentation transcript:

Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, General Concepts Basic microcomputer design Instruction execution cycle Reading from memory

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Basic Microcomputer Design clock synchronizes CPU operations control unit (CU) coordinates sequence of execution steps ALU performs arithmetic and bitwise processing

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Clock synchronizes all CPU and BUS operations machine (clock) cycle measures time of a single operation clock is used to trigger events

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Instruction Execution Cycle Fetch Decode Fetch operands Execute Store output

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Multi-Stage Pipeline Instruction execution divided into discrete stages Example of a non- pipelined processor. Many wasted cycles.

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Pipelined Execution More efficient use of cycles, greater throughput of instructions: For k states and n instructions, the number of required cycles is: k + (n – 1)

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Reading from Memory Multiple machine cycles are required when reading from memory, because it responds much more slowly than the CPU. The steps are: address placed on address bus Read Line (RD) set low CPU waits one cycle for memory to respond Read Line (RD) goes to 1, indicating that the data is on the data bus

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Basic Execution Environment Addressable memory General-purpose registers Index and base registers Specialized register uses Status flags Floating-point

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, General-Purpose Registers Named storage locations inside the CPU, optimized for speed.

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Accessing Parts of Registers Use 8-bit name, 16-bit name, or 32-bit name Applies to EAX, EBX, ECX, and EDX

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Index and Base Registers Some registers have only a 16-bit name for their lower half:

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Some Specialized Register Uses (1 of 2) General-Purpose EAX – accumulator ECX – loop counter ESP – stack pointer ESI, EDI – index registers EBP – extended frame pointer Segment CS – code segment DS – data segment SS – stack segment ES, FS, GS - additional segments

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Some Specialized Register Uses (2 of 2) EIP – instruction pointer EFLAGS status and control flags each flag is a single binary bit

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Status Flags Carry unsigned arithmetic out of range Overflow signed arithmetic out of range Sign result is negative Zero result is zero Auxiliary Carry carry from bit 3 to bit 4 Parity sum of 1 bits is an even number

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Carry and Overflow Carry is important when … Adding or subtracting unsigned integers Indicates that the unsigned sum is out of range Overflow is important when … Adding or subtracting signed integers Indicates that the signed sum is out of range Overflow occurs when Adding two positive numbers and the sum is negative Adding two negative numbers and the sum is positive Can happen because of the fixed number of sum bits

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, (-113) Carry = 0 Overflow = (-38) 157 (-99) 119 Carry = 1 Overflow = Carry and Overflow Examples We can have carry without overflow and vice-versa Four cases are possible Carry = 0 Overflow = (-11) 4 Carry = 1 Overflow =

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Addressable Memory Protected mode 4 GB 32-bit address Real-address and Virtual-8086 modes 1 MB space 20-bit address

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Real-Address mode 1 MB RAM maximum addressable Application programs can access any area of memory Single tasking Supported by MS-DOS operating system

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Segmented Memory Segmented memory addressing: absolute (linear) address is a combination of a 16-bit segment value added to a 16-bit offset linear addresses one segment

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Calculating Linear Addresses Given a segment address, multiply it by 16 (add a hexadecimal zero), and add it to the offset Example: convert 08F1:0100 to a linear address Adjusted Segment value: 0 8 F 1 0 Add the offset: Linear address:

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Calculating Linear Addresses What linear address corresponds to the segment/offset address 028F:0030? 028F = Always use hexadecimal notation for addresses.

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Calculating Linear Addresses What segment addresses correspond to the linear address 28F30h? Many different segment-offset addresses can produce the linear address 28F30h. For example: 28F0:0030, 28F3:0000, 28B0:0430,...

Web siteWeb site ExamplesExamples Irvine, Kip R. Assembly Language for Intel-Based Computers 5/e, Intel Registers