1 / 30

Computers Organization & Assembly Language

Computers Organization & Assembly Language. Chapter 1 THE 80x86 MICROPROCESSOR. The 80x86 Microprocessor. Brief History of the 80x86 Family Inside the 8088/8086 Introduction to Assembly Language Assembly and Machine Language. Brief History of the 80x86 Family. Intel Microprocessors.

vina
Télécharger la présentation

Computers Organization & Assembly Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computers Organization& Assembly Language Chapter 1 THE 80x86 MICROPROCESSOR

  2. The 80x86 Microprocessor • Brief History of the 80x86 Family • Inside the 8088/8086 • Introduction to Assembly Language • Assembly and Machine Language

  3. Brief History of the 80x86 Family Intel Microprocessors • 8080/8085: • The world’s first general-purpose microprocessor. • 8-bit machine, with an 8-bit data bus to memory. • The 8080 was used in the first personal computer. • 8-bit registers and 64KB Memory. • Nonpipelined. • 8086 in 1979 : • 16-bit machine, with an 16-bit data bus to memory. • 16-bit registers and 1 MB Memory. • Pipelined. • 8088: • 16-bit machine, with an 8-bit data bus to memory. • 16-bit registers and 1 MB Memory. • Pipelined.

  4. Brief History of the 80x86 Family Intel Microprocessors • 80286 was introduced in 1982 : • Identical to the 8086 and 8088, except I6 MB Memory. • Two modes of operations: • Real mode (DOS) with max memory 1 MB. • Protected mode(WINDOWS) with 16 MB memory. • 80386 was introduced in 1985 : • First 32-bit machine. • This was the first Intel processor to support multitasking. • Memory 4 GB. • 80486 was introduced 1989 : • Full cache technology and pipelining. • Built-in math coprocessor.

  5. Intel 80486 and Pentium Processors • 80486 • Improved version of Intel 80386 • On-chip Floating-Point unit (DX versions) • On-chip unified Instruction/Data Cache (8 KB) • Uses Pipelining: can execute up to 1 instruction per clock cycle

  6. Pentium (80586) was introduced in 1993 • Wider 64-bit data bus, but address bus is still 32 bits • Two execution pipelines: U-pipe and V-pipe • Superscalar performance: can execute 2 instructions per clock cycle • Separate 8 KB instruction and 8 KB data caches • MMX instructions (later models) for multimedia applications

  7. Intel P6 Processor Family • P6 Processor Family: Pentium Pro, Pentium II and III • Pentium Pro was introduced in 1995 • Three-way superscalar: can execute 3 instructions per clock cycle • 36-bit address bus  up to 64 GB of physical address space • Introduced dynamic execution • Out-of-order and speculative execution • Integrates a 256 KB second level L2 cache on-chip • Pentium II was introduced in 1997 • Added MMX instructions (already introduced on Pentium MMX) • Pentium III was introduced in 1999 • Added SSE instructions and eight new 128-bit XMM registers

  8. Pentium 4 and Xeon Family • Pentium 4 is a seventh-generation x86 architecture • Introduced in 2000 • New micro-architecture design called Intel Netburst • Very deep instruction pipeline, scaling to very high frequencies • Introduced the SSE2 instruction set (extension to SSE) • Tuned for multimedia and operating on the 128-bit XMM registers • In 2002, Intel introduced Hyper-Threading technology • Allowed 2 programs to run simultaneously, sharing resources • Xeon is Intel's name for its server-class microprocessors • Xeon chips generally have more cache • Support larger multiprocessor configurations

  9. Pentium-M and EM64T • Pentium M (Mobile) was introduced in 2003 • Designed for low-power laptop computers • Modified version of Pentium III, optimized for power efficiency • Large second-level cache (2 MB on later models) • Runs at lower clock than Pentium 4, but with better performance • Extended Memory 64-bit Technology (EM64T) • Introduced in 2004 • 64-bit superset of the IA-32 processor architecture • 64-bit general-purpose registers and integer support • Number of general-purpose registers increased from 8 to 16 • 64-bit pointers and flat virtual address space • Large physical address space: up to 240 = 1 Terabytes

  10. Intel Core MicroArchitecture • 64-bit cores • Wide dynamic execution (execute four instructions simultaneously) • Intelligent power capability (power gating) • Advanced smart cache (shares L2 cache between cores) • Smart memory access (memory disambiguation) • Advanced digital media boost See the demo at http://www.intel.com/technology/architecture/coremicro/demo/demo.htm?iid=tech_core+demo

  11. Brief History of the 80x86 Family

  12. Inside the 8088/8086

  13. Some Important Questions to Ask • What is Assembly Language? • Why Learn Assembly Language? • What is Machine Language? • How is Assembly related to Machine Language? • What is an Assembler? • How is Assembly related to High-Level Language? • Is Assembly Language portable?

  14. A Hierarchy of Languages

  15. Assembly and Machine Language • Machine language • Native to a processor: executed directly by hardware • Instructions consist of binary code: 1s and 0s • Assembly language • A programming language that uses symbolic names to represent operations, registers and memory locations. • Slightly higher-level language • Readability of instructions is better than machine language • One-to-one correspondence with machine language instructions • Assemblers translate assembly to machine code • Compilers translate high-level programs to machine code • Either directly, or • Indirectly via an assembler

  16. Compiler and Assembler

  17. Instructions and Machine Language • Each command of a program is called an instruction (it instructs the computer what to do). • Computers only deal with binary data, hence the instructions must be in binary format (0s and 1s) . • The set of all instructions (in binary form) makes up the computer's machine language. This is also referred to as the instruction set.

  18. Instruction Fields • Machine language instructions usually are made up of several fields. Each field specifies different information for the computer. The major two fields are: • Opcode field which stands for operation code and it specifies the particular operation that is to be performed. • Each operation has its unique opcode. • Operands fields which specify where to get the source and destination operands for the operation specified by the opcode. • The source/destination of operands can be a constant, the memory or one of the general-purpose registers.

  19. Assembly vs. Machine Code

  20. Translating Languages English: D is assigned the sum of A times B plus 10. High-Level Language: D = A * B + 10 A statement in a high-level language is translated typically into several machine-level instructions Intel Assembly Language: moveax, A mul B add eax, 10 mov D, eax Intel Machine Language: A1 00404000 F7 25 00404004 83 C0 0A A3 00404008

  21. Mapping Between Assembly Language and HLL • Translating HLL programs to machine language programs is not a one-to-one mapping • A HLL instruction (usually called a statement) will be translated to one or more machine language instructions

  22. Advantages of High-Level Languages • Program development is faster • High-level statements: fewer instructions to code • Program maintenance is easier • For the same above reasons • Programs are portable • Contain few machine-dependent details • Can be used with little or no modifications on different machines • Compiler translates to the target machine language • However, Assembly language programs are not portable

  23. Why Learn Assembly Language? • Accessibility to system hardware • Assembly Language is useful for implementing system software • Also useful for small embedded system applications • Space and Time efficiency • Understanding sources of program inefficiency • Tuning program performance • Writing compact code • Writing assembly programs gives the computer designer the needed deep understanding of the instruction set and how to design one • To be able to write compilers for HLLs, we need to be expert with the machine language. Assembly programming provides this experience

  24. Assembly vs. High-Level Languages • Some representative types of applications:

  25. Assembler • Software tools are needed for editing, assembling, linking, and debugging assembly language programs • An assembler is a program that converts source-code programs written in assembly language into object files in machine language • Popular assemblers have emerged over the years for the Intel family of processors. These include … • TASM (Turbo Assembler from Borland) • NASM (Netwide Assembler for both Windows and Linux), and • GNU assembler distributed by the free software foundation

  26. Application Programs High-Level Language Level 5 Assembly Language Level 4 Operating System Level 3 Instruction Set Level 2 Architecture Microarchitecture Level 1 Digital Logic Level 0 Programmer’s View of a Computer System Increased level of abstraction Each level hides the details of the level below it

  27. Programmer's View – 2 • Application Programs (Level 5) • Written in high-level programming languages • Such as Java, C++, Pascal, Visual Basic . . . • Programs compile into assembly language level (Level 4) • Assembly Language (Level 4) • Instruction mnemonics are used • Have one-to-one correspondence to machine language • Calls functions written at the operating system level (Level 3) • Programs are translated into machine language (Level 2) • Operating System (Level 3) • Provides services to level 4 and 5 programs • Translated to run at the machine instruction level (Level 2)

  28. Programmer's View – 3 • Instruction Set Architecture (Level 2) • Specifies how a processor functions • Machine instructions, registers, and memory are exposed • Machine language is executed by Level 1 (microarchitecture) • Microarchitecture (Level 1) • Controls the execution of machine instructions (Level 2) • Implemented by digital logic (Level 0) • Digital Logic (Level 0) • Implements the microarchitecture • Uses digital logic gates • Logic gates are implemented using transistors

  29. Instruction Set Architecture (ISA) • Collection of assembly/machine instruction set of the machine • Machine resources that can be managed with these instructions • Memory • Programmer-accessible registers. • Provides a hardware/software interface

  30. Summary • Assembly language helps you learn how software is constructed at the lowest levels • Assembly language has a one-to-one relationship with machine language • Each layer in a computer's architecture is an abstraction of a machine • layers can be hardware or software

More Related