Lecture (02) x86 programming 1

Similar documents
Instruction Set Architectures

CS241 Computer Organization Spring Introduction to Assembly

Roadmap. Java: Assembly language: OS: Machine code: Computer system:

Instruction Set Architectures

+ Machine Level Programming: x86-64 History

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

SYSTEM BUS AND MOCROPROCESSORS HISTORY

Introduction to Microprocessor

Machine-level Representation of Programs

Segment 1A. Introduction to Microcomputer and Microprocessor

CSC 252: Computer Organization Spring 2018: Lecture 5

Last Time: Floating Point. Intel x86 Processors. Lecture 4: Machine Basics Computer Architecture and Systems Programming ( )

Today: Machine Programming I: Basics. Machine Level Programming I: Basics. Intel x86 Processors. Intel x86 Evolution: Milestones

Chapter 2 Logic Gates and Introduction to Computer Architecture

The von Neumann Machine

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

The von Neumann Machine

Computer Systems Architecture

Today: Machine Programming I: Basics

Alternate definition: Instruction Set Architecture (ISA) What is Computer Architecture? Computer Organization. Computer structure: Von Neumann model

Processing Unit CS206T

Lecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)

MACHINE-LEVEL PROGRAMMING I: BASICS

3.1 Description of Microprocessor. 3.2 History of Microprocessor

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

CIT 668: System Architecture

Von Neumann Architecture

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

Computer Organization CS 206T

Chapter 1 : Introduction

Introduction to IA-32. Jo, Heeseung


Computer Organization

INTRODUCTION TO IA-32. Jo, Heeseung

Machine Level Programming I: Basics

CC411: Introduction To Microprocessors

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Calendar Description

Assembly Language Programming

ECE 471 Embedded Systems Lecture 2

Figure 1-1. A multilevel machine.

Instruction Set Architectures

Assembly Language. Lecture 2 x86 Processor Architecture

CS Computer Architecture

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

Evolution of Computers & Microprocessors. Dr. Cahit Karakuş

Evolution of the Computer

Chapter 9: A Closer Look at System Hardware

Chapter 9: A Closer Look at System Hardware 4

THE MICROCOMPUTER SYSTEM CHAPTER - 2

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

INTRODUCTION TO MICROPROCESSORS

Carnegie Mellon. 5 th Lecture, Jan. 31, Instructors: Todd C. Mowry & Anthony Rowe

Lecture 1: Gentle Introduction to GPUs

Today: Machine Programming I: Basics. Machine-Level Programming I: Basics. Intel x86 Processors. Intel x86 Evolution: Milestones

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Chapter 7: Processor and Memory

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

Chapter 3 Machine-Level Programming I: Basics. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition

ECE 571 Advanced Microprocessor-Based Design Lecture 3

ENIAC - background. ENIAC - details. Structure of von Nuemann machine. von Neumann/Turing Computer Architecture

5 Computer Organization

Homework. Reading. Machine Projects. Labs. Exam Next Class. None (Finish all previous reading assignments) Continue with MP5

ECE 486/586. Computer Architecture. Lecture # 8

Chapter 1: Basics of Microprocessor [08 M]

Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition. Carnegie Mellon

Outline Marquette University

Chapter 1: Introduction to the Microprocessor and Computer 1 1 A HISTORICAL BACKGROUND

Chronological History of the Pre-Computer Developments

8085 microprocessor Submitted in partial fulfillment of the requirement for the award of degree of Electronics

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Dec Hex Bin ORG ; ZERO. Introduction To Computing

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 03, SPRING 2013

Computer Architecture

SSRVM Content Creation Template

x86 Architectures; Assembly Language Basics of Assembly language for the x86 and x86_64 architectures

Computer Systems. Hardware, Software and Layers of Abstraction

Technology in Action

Computer & Microprocessor Architecture HCA103

2. Computer Evolution and Performance

Computer Architecture

HISTORY OF MICROPROCESSORS

Machine-Level Programming I: Basics

Today: Machine Programming I: Basics. Machine-Level Programming I: Basics. Intel x86 Processors. Intel x86 Evolution: Milestones

ECE232: Hardware Organization and Design

CS 101, Mock Computer Architecture

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

5 Computer Organization

High Performance Computing

Computer Systems Laboratory Sungkyunkwan University

Update on logistics ECS 15

Computer Architecture Computer Architecture. Computer Architecture. What is Computer Architecture? Grading

omputer Design Concept adao Nakamura

Computer Architecture 2/26/01 Lecture #

Systems I. Machine-Level Programming I: Introduction

Computer System architectures

Transcription:

Lecture (02) x86 programming 1 By: Dr. Ahmed ElShafee ١ TOC Historical Perspective Basic component of microprocessor based system Types of instruction set The Memory Map of a Personal Computers The 80x86 Registers ٢

Historical Perspective 1st generation: 1945-1955 Tubes, punchcards 2nd generation: 1955-1965 transistors 3rd generation: 1965 1980 Integrated circuits 4th generation: 1980 1990 PCs and workstations 5 th generation: 1990 now Networks and distributed systems ٣ >1st generation (1945-1955) Programming was done in machine language No operating system Programming and maintenance done by one group of people ٤

ENIAC The first electronic computer (1946) 18,000 tubes 300 Tn 170 KWatt ٥ ٦

٧ > 2nd generation (1955-1965) Transistor-based Fairly reliable Clear distinction between designers, manufacturers, users, programmers, and support personnel. Only afforded by governments, universities or large companies (millions $) Program was first written on paper (FORTRAN) and then punched into cards Cards were then delivered to the user. Mostly used for scientific and technical calculations Solving differential equations ٨

٩ ١٠

> 3rd generation (1965-1980) IC-based operation IBM develops compatible systems Tradeoffs in performance, memory, I/O etc). Very expensive ١١ ١٢

١٣ > 4th generation (1980-1990) VLSI-based PCs Significantly cheaper User-friendly software 2 dominant operating systems: MS DOS: IBM PC (8088, 80286, 80386, 80486) UNIX: RISC workstations ١٤

> 5th generation (1990-till now) PC networks Network operating systems Each machine runs its own operating system Users don t care where their programs are being executed ١٥ > Moore's law Moore's law is the observation that the number of transistors in a dense integrated circuit doubles approximately every two years ١٦

١٧ > Intel x86 Evolution: Milestones Name Date Transistors MHz 8086 1978 29K 5 10 First 16 bit Intel processor. Basis for IBM PC & DOS 1MB address space 386 1985 275K 16 33 First 32 bit Intel processor, referred to as IA32 Added "flat addressing", capable of running Unix IA32 is an abbreviation of "Intel Architecture 32 bit"; it refers to common 32 bit computer architectures. where "architecture" means [hardware] + [appropriate Operating System]; ١٨

Name Date Transistors MHz Pentium 4E 2004 125M 2800 3800 First 64 bit Intel x86 processor, referred to as x86 64 Core 2 2006 291M 1060 3333 First multi core Intel processor Core i7 2008 731M 1600 4400 Four cores ١٩ > Machine Evolution 386 1985 0.3M Pentium 1993 3.1M Pentium/MMX 1997 4.5M PentiumPro 1995 6.5M Pentium Ill 1999 8.2M Pentium 4 2000 42M Core 2 Duo 2006 291M Core i7 2008 731M ٢٠

Past Generations year Process technology 1st Pentium Pro 1995 600 nm 1st Pentium Ill 1999 250 nm 1st Pentium 4 2000 180 nm 1st Core 2 Duo 2006 65 nm Process technology dimension = width of narrowest wires (10 nm == 100 atoms wide) ٢١ Recent & Upcoming Generations 1. Nehalem 2008 45 nm 2. Sandy Bridge 2011 32 nm 3. Ivy Bridge 2012 22 nm 4. Haswell 2013 22 nm 5. Broadwell 2014 14 nm 6. Skylake 2015 14 nm 7. Kaby Lake 2016 14 nm 8. Coffee Lake 2017 14 nm 9. Cannonlake 2018? 10 nm ٢٢

> x86 Clones: Advanced Micro Devices (AMD) Historically AMD has followed just behind Intel A little bit slower, a lot cheaper Then Recruited top circuit designers from Digital Equipment Corp. and other downward trending companies Built Opteron: tough competitor to Pentium 4 Developed x86 64, their own extension to 64 bits ٢٣ Recent Years Intel got its act together Leads the world in semiconductor technology AMD has fallen behind Relies on external semiconductor manufacturer ٢٤

> Intel's 64 Bit History 2001: Intel Attempts Radical Shift from IA32 to IA64 Totally different architecture (ltanium) Executes IA32 code only as legacy Performance disappointing 2003: AMD Steps in with Evolutionary Solution x86 64 (now called "AMD64") Intel Felt Obligated to Focus on IA64 Hard to admit mistake or that AMD is better ٢٥ 2004: Intel Announces EM64T extension to IA32 Extended Memory 64 bit Technology Almost identical to x86 64! All but low end x86 processors support x86 64 But, lots of code still runs in 32 bit mode ٢٦

Basic component of micro processor based system ٢٧ > 86x in action; Fetching & Execution Cycles Fetching Cycles The fetch cycle takes the instruction required from memory, stores it in the instruction register, and moves the program counter on one so that it points to the next instruction. ٢٨

Execute cycle The actual actions which occur during the execute cycle of an instruction. depend on both the instruction itself and the addressing mode specified to be used to access the data that may be required. ٢٩ > Fetching an instruction Step 1 Instruction pointer (program counter) hold the address of the next instruction to be fetch. 30

Step 2 31 Step 3 32

Step 4 33 Step 5 34

Step 6 35 ٣٦

> ALU Arithmetic and Logic Unit The component that performs the arithmetic and logical operations the most important components in a microprocessor, and is typically the part of the processor that is designed first. able to perform the basic logical operations (AND, OR), including the other additional operation. The inclusion of inverters on the inputs enables the same ALU hardware to perform the subtraction operation (adding an inverted operand), and the operations NAND and NOR. ٣٧ 2 bits of ALU 4 bits of ALU ٣٨

> Control Unit The circuitry that controls the flow of information through the processor, and coordinates the activities of the other units within it. In a way, it is the "brain within the brain", as it controls what happens inside the processor, which in turn controls the rest of the PC. On a regular processor, the control unit performs the tasks of fetching, decoding, managing execution and then storing results. ٣٩ > Internal structure of control unit ٤٠

> Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the ALU or to the control section or to memory. The number of registers are different for any particular CPU and the more register a CPU have will result in easier programming tasks. Registers are normally measured by the number of bits they can hold, for example, an "8 bit register" or a "32 bit register". ٤١ > IA32 Registers ٤٢

> x86 64 Integer Registers ٤٣ ** Accumulator a register in which intermediate arithmetic and logic results are stored. example for accumulator use is summing a list of numbers. The accumulator is initially set to zero, then each number in turn is added to the value in the accumulator. Only when all numbers have been added is the result held in the accumulator written to main memory or to another, nonaccumulator, CPU register. ٤٤

** Program counter (PC) a register, used to store the next address of the operation code to be fetched by the CPU. Not much use in programming, but as an indicator to user only. Purpose of PC in a Microprocessor to store address of next instruction to be executed. ٤٥ > Bus system a subsystem that transfers data between computer components inside a computer or between computers. ٤٦ 4 PCI Express bus card slots (from top to bottom: x4, x16, x1 and x16), compared to a traditional 32-bit PCI bus card slot (very bottom).

٤٧ > Data bus The data bus is 'bi directional' data or instruction codes from memory or input/output are transferred into the microprocessor the result of an operation or computation is sent out from the microprocessor to the memory or input/output. Depending on the particular microprocessor, the data bus can handle 8 bit or 16 bit data. ٤٨

> Address bus The address bus is 'unidirectional', over which the microprocessor sends an address code to the memory or input/output. The size (width) of the address bus is specified by the number of bits it can handle. The more bits there are in the address bus, the more memory locations a microprocessor can access. A 16 bit address bus is capable of addressing 65,536 (64K) addresses. ٤٩ > Control bus The control bus is used by the microprocessor to send out or receive timing and control signals in order to coordinate and regulate its operation and to communicate with other devices, i.e. memory or input/output. ٥٠

Thanks,.. ٥١