Chapter 2 An Introduction to the 80x86 Microprocessor Family Objectives: Real-mode and protected-mode operation The register set of 80x86 family The addressing.

Slides:



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

Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Introduction to 8086 Microprocessor
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
The Microprocessor and its Architecture
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Gursharan Singh Tatla 21-Nov-20101www.eazynotes.com.
8086 : INSTRUCTION SET By, Pramod Sunagar Assistant Professor
Princess Sumaya University
IA-32 Processor Architecture
© 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 5 Arithmetic and Logic Instructions.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
Computer System A computers system has many distinct parts:  Microprocessor  Memory system  I/O system  Buses The way in which these parts are interconnected.
CEG 320/520: Computer Organization and Assembly Language ProgrammingIntel Assembly 1 Intel IA-32 vs Motorola
An Introduction to 8086 Microprocessor.
Ch. 7 Logic, Shift and Rotate instr.
Khaled A. Al-Utaibi  Introduction  Arithmetic Instructions  Basic Logical Instructions  Shift Instructions  Rotate Instructions.
The Pentium Processor Chapter 3 S. Dandamudi.
Electrical Engineering Department Engineering College Prince Sattam bin Abdul Aziz University Text Book: - Triebel and Singh, "The 8088 and 8086 Microprocessors",
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Five Components of a Computer
Types of Registers (8086 Microprocessor Based)
Microprocessors Monday, Apr. 13 Dr. Asmaa Farouk Faculty of Engineering, Electrical Department, Assiut University.
Logical and Bit Operations Chapter 9 S. Dandamudi.
3.4 Addressing modes Specify the operand to be used. To generate an address, a segment register is used also. Immediate addressing: the operand is a number.
Introduction to Microprocessors Chapter 3. Programming Model (8086)  Shows the various internal registers that are accessible to the programmer.
INTRODUCTION TO INTEL X-86 FAMILY
The Assemble, Unassemble commands of the debugger: U Command for converting machine code language source Equivalent machine code instructions Equivalent.
Chapter 7 Bit Manipulation. 7.1 Logical Operations.
Microprocessor & Assembly Language Arithmetic and logical Instructions.
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Internal Programming Architecture or Model
Microprocessor & Assembly Language
Preliminary to Assembly Language Programming CE 140 A1/A2 28 June 2003.
Intel 8086 MICROPROCESSOR ARCHITECTURE
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.
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
Computer Architecture and Assembly Language
Data Transfers, Addressing, and Arithmetic
16.317: Microprocessor System Design I
History – 2 Intel 8086.
UNIT Architecture M.Brindha AP/EIE
Introduction to 8086 Microprocessor
8086 Microprocessor.
Chapter instruction description and assembler directives from Microprocessors and Interfacing by Douglas Hall.
EE3541 Introduction to Microprocessors
Basic Microprocessor Architecture
Machine control instruction
Intel 8088 (8086) Microprocessor Structure
Five Components of a Computer
Defining Types of data expression Dn [name] expression Dn [name]
CS 301 Fall 2002 Assembly Instructions
Introduction to Assembly Language
Intel 8088 (8086) Microprocessor Structure
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
CS 301 Fall 2002 Computer Organization
University of Gujrat Department of Computer Science
The Microprocessor & Its Architecture
Shift & Rotate Instructions)
Five Components of a Computer
Chapter 5 Arithmetic and Logic Instructions
Computer Architecture and System Programming Laboratory
Chapter 6 –Symbolic Instruction and Addressing
Intel 8086.
Presentation transcript:

Chapter 2 An Introduction to the 80x86 Microprocessor Family Objectives: Real-mode and protected-mode operation The register set of 80x86 family The addressing capabilities and data types that may be used EE314 Microprocessor Systems Based on "An Introduction to the Intel Family of Microprocessors" by James L. Antonakos

2.2 Real mode and Protected mode operation Addressable memory: address lines => 1MB (Mega Byte) Pentium 32 address lines => 4096MB For compatibility, all the 80x86 family members start running in “Real Mode”, emulating the 8086 features (i.e. 1MB RAM) Beginning with 80286, the “Protected Mode” is also available, allowing direct control of all address lines (all addressable memory), multitasking support, virtual memory addressing, memory management and protection (against violation from other task), control over internal data and instruction cache.

2.3 The Software Model of 80x86 Family , , , bit registers, or higher only Accumulator Base Count Data Base Pointer Source Index Destination Index 8 bit registers16 bit registers Code Segment Data Segment Stack Segment Extra Segment Instruction Pointer Stack Pointer Flags Extended registers, only on and higher CPUs FS GS

2.4 Processor Registers A F00 A5F00 Shift to left 4 bits Add Effective Address (20bits) 16 bit Segment = a 64kbyte memory block beginning at a multiple by 10H address. An effective address is generated as combination between a segment register and another register as in the example. Each segment register has a default usage (class of instructions where apply). Multiply, divide, accessing I/O... Counter in loop operations Multiply, divide, pointer to I/O... Source index in string operations... Destination index in string operations Pointer in program flow Pointer in Stack Control and status flags A prefix (66H) allows using 32 bit registers in the real mode: db 66h ;EAX instead AX mov ax,1140h ;less significant 16 bits db 058bh ;most significant 16 bits , bit registers FS GS Accumulator Base Count Data Base Pointer Source Index Destination Index Code Segment Data Segment Stack Segment Extra Segment Instruction Pointer Stack Pointer Flags

2.4 Processor Registers Flag register CF PF AF ZF SF TF IF DF OF IOPL NT Carry Flag Parity Flag Auxiliary carry Flag Zero Flag Sign Flag Trace Flag Interrupt enable Flag Direction Flag Overflow Flag I/O Priority Level Nested Task Contains Carry out of MSB of result Indicates if result has even parity Contains Carry out of bit 3 in AL Indicates if result equals zero Indicates if result is negative Provides a single step capability for debugging Enables/disables interrupts Controls pointer updating during string operations Indicates that an overflow occurred in result Priority level of current task (two bits) Indicates if current task is nested

2.5 Data Organization Bits, Bytes, Words, Double-words Name Bit Nibble Byte Word Double Word Size BInary digiT 4 bits 8 bits 16 bits = 2 bytes 32 bits = 4 bytes Possible Values BinaryHexadecimalDecimal 0,10,10, F0…15 0…1111,11110…FF0…255 0…(16 ‘1’s) 0…FFFF0…65,535 0…(32 ‘1’s)0…FFFFFFFF0...4,294,967,295 Byte swapping: if a word has to be stored into an 8 bit wide memory at address adr, its low byte is stored at adr and its high byte at adr+1. If a word is read from an 8 bit memory at address adr, the low byte is loaded from adr and the high byte from adr+1. Rule: low significance low address

2.5 Data Organization Assembler directives DB, DW, DUP and EQU. Example 0000.DATA NUM1DB NUM2DB100B NUM3DB? D 30 C8 3A CE NUMSDB15O,48,200,3AH,0CEH MSGDB ’Hi$’ 000E 0006 WXDW E8 WYDW ABCD WZDW1234H,0ABCDH TEMPDW? A [00] SRSDB10 DUP(0) [0000] TIMEDW7 DUP(?) =000D TOPEQU13 =157C MOREEQU5500 Define Byte reserves memory for a byte and assign to it the specified value. Similarly, Define Word reserves memory space for a word and assign to it the specified value D C A 0007 CE... Byte swapping CD 0015 AB... A numerical value begins with a decimal digit, or a non-significant “0” is added A list of values can be used. A ’character string’ generates the associate ASCII bytes Decimal, binary, octal or hexadecimal numbers can be used. A “?” reserves memory space without assigning values. Duplicate repeats n times the value between ( ). Equate directive assign a value to a constant without memory space reservation. A label is assigned the address of the first byte involved in its statement.

2.6 Instruction types Data transfer instructions 8086 instruction set INInput byte or word from port LAHFLoad AH from flags LDSLoad pointer using data segment LEALoad effective address LESLoad pointer using extra segment MOVMove to/from register/memory OUTOutput byte or word to port POPPop word off stack POPFPop flags off stack PUSHPush word onto stack PUSHFPush flags onto stack SAHFStore AH into flags XCHGExchange byte or word XLATTranslate byte Additional instructions INSInput string from port OUTSOutput string to port POPAPop all registers PUSHAPush all registers Additional instructions LFS Load pointer using FS LGS Load pointer using GS LSS Load pointer using SS MOVSX Move with sign extended MOVZX Move with zero extended POPAD Pop all double (32 bit) registers POPD Pop double register POPFD Pop double flag register PUSHAD Push all double registers PUSHD Push double register PUSHFD Push double flag register Additional instruction BSWAPByte swap Additional Pentium instruction MOVMove to/from control register

2.6 Instruction types Arithmetic instructions 8086 instruction set AAAASCII adjust for addition AADASCII adjust for division AAM ASCII adjust for multiply AAS ASCII adjust for subtraction ADCAdd byte or word plus carry ADDAdd byte or word CBWConvert byte or word CMPCompare byte or word CWDConvert word to double-word DAADecimal adjust for addition DAS Decimal adjust for subtraction DECDecrement byte or word by one DIVDivide byte or word IDIVInteger divide byte or word IMULInteger multiply byte or word INCIncrement byte or word by one MULMultiply byte or word (unsigned) NEGNegate byte or word SBBSubtract byte or word and carry (borrow) SUBSubtract byte or word Additional instructions CDQConvert double-word to quad-word CWDE Convert word to double-word Additional instructions CMPXCHG Compare and exchange XADD Exchange and add Additional Pentium instruction CMPXCHG8B Compare and exchange 8 bytes

2.6 Instruction types Bit manipulation instructions 8086 instruction set ANDLogical AND of byte or word NOTLogical NOT of byte or word ORLogical OR of byte or word RCLRotate left trough carry byte or word RCRRotate right trough carry byte or word ROL Rotate left byte or word ROR Rotate right byte or word SALArithmetic shift left byte or word SAR Arithmetic shift right byte or word SHL Logical shift left byte or word SHR Logical shift right byte or word TESTTest byte or word XORLogical exclusive-OR of byte or word Additional instructions BSFBit scan forward BSRBit scan reverse BTBit test BTCBit test and complement BTRBit test and reset BTSBit test and set SETccSet byte on condition SHLDShift left double precision SHRDShift right double precision

2.6 Instruction types String instructions 8086 instruction set CMPSCompare byte or word string LODSLoad byte or word string MOVSMove byte or word string MOVSB(MOVSW)Move byte string (word string) REPRepeat REPE (REPZ)Repeat while equal (zero) REPNE (REPNZ)Repeat while not equal (not zero) SCASScan byte or word string STOSStore byte or word string