1 / 37

Micro-Computer Applications: Number system & 8086 Organization

ELECT 707. Micro-Computer Applications: Number system & 8086 Organization. Dr. Eng. Amr T. Abdel-Hamid. Fall 2011. The Microprocessor Age. World’s first microprocessor the Intel 4004 . A 4-bit microprocessor-programmable controller on a chip. Addressed 4096, 4-bit-wide memory locations.

farren
Télécharger la présentation

Micro-Computer Applications: Number system & 8086 Organization

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. ELECT 707 Micro-Computer Applications: Number system & 8086 Organization Dr. Eng. Amr T. Abdel-Hamid Fall 2011

  2. The Microprocessor Age • World’s first microprocessor the Intel 4004. • A 4-bit microprocessor-programmable controller on a chip. • Addressed 4096, 4-bit-wide memory locations. • a bit is a binary digit with a value of one or zero • 4-bit-wide memory location often called a nibble • The 4004 instruction set contained 45 instructions.

  3. Main problems with early microprocessor were speed, word width, and memory size. • Evolution of 4-bit microprocessor ended when Intel released the 4040, an updated 4004. • operated at a higher speed; lacked improvements in word width and memory size • Texas Instruments and others also produced 4-bit microprocessors. • still survives in low-end applications such as microwave ovens and small control systems • Calculators still based on 4-bit BCD (binary-coded decimal) codes

  4. Intel released 8008 in 1971. • extended 8-bit version of 4004 microprocessor • Addressed expanded memory of 16K bytes. • A byte is generally an 8-bit-wide binary number and a K is 1024. • memory size often specified in K bytes • Contained additional instructions, 48 total. • Provided opportunity for application in more advanced systems. • engineers developed demanding uses for 8008

  5. Intel introduced 8080 microprocessor in 1973. • first of the modern 8-bit microprocessors • Motorola Corporation introduced MC6800 microprocessor about six months later. • 8080—and, to a lesser degree, the MC6800—ushered in the age of the microprocessor. • other companies soon introduced their own versions of the 8-bit microprocessor

  6. Only Intel and Motorola continue to create new, improved microprocessors. • IBM also produces Motorola-style microprocessors • Motorola sold its microprocessor division. • now called Freescale Semiconductors, Inc. • Zilog still manufactures microprocessors. • microcontrollers and embedded controllers instead of general-purpose microprocessors

  7. The Modern Microprocessor • In 1978 Intel released the 8086; a year or so later, it released the 8088. • Both devices are 16-bit microprocessors. • executed instructions in as little as 400 ns (2.5 millions of instructions per second) • major improvement over execution speed of 8085 • 8086 & 8088 addressed 1M byte of memory. • 16 times more memory than the 8085 • 1M-byte memory contains 1024K byte-sized memory locations or 1,048,576 bytes

  8. Increased memory size and additional instructions in 8086/8088 led to many sophisticated applications. • Improvements to the instruction set included multiply and divide instructions. • missing on earlier microprocessors • Number of instructions increased. • from 45 on the 4004, to 246 on the 8085 • over 20,000 variations on the 8086 & 8088

  9. These microprocessors are called CISC (complex instruction set computers). • additional instructions eased task of developing efficient and sophisticated applications • 16-bit microprocessor also provided more internal register storage space. • Popularity of Intel ensured in 1981 when IBM chose the 8088 in its personal computer.

  10. THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM • Computers have undergone many changes recently. • Machines that once filled large areas reduced to small desktop computer systems becauseof the microprocessor. • although compact, they possess computing power only dreamed of a few years ago

  11. The block diagram of a microprocessor-based computer system. • a bus is the set of common connectionsthat carry the same type of information

  12. The Microprocessor • Called the CPU (central processing unit). • The controlling element in a computer system. • Controls memory and I/O through connections called buses. • buses select an I/O or memory device, transfer data between I/O devices or memory and the microprocessor, control I/O and memory systems • Memory and I/O controlled via instructions stored in memory, executed by the microprocessor.

  13. Microprocessor performs three main tasks: • data transfer between itself and the memory or I/O systems • simple arithmetic and logic operations • program flow via simple decisions • Power of the microprocessor is capability to execute billions of millions of instructions per second from a program or software (group of instructions) stored in the memory system. • stored programs make the microprocessor and computer system very powerful devices

  14. Another powerful feature is the ability to make simple decisions based upon numerical facts. • a microprocessor can decide if a number is zero, positive, and so forth • These decisions allow the microprocessor to modify the program flow, so programs appear to think through these simple decisions.

  15. Buses • A common group of wires that interconnect components in a computer system. • Transfer address, data, & control information between microprocessor, memory and I/O. • Three buses exist for this transfer of information: address, data, and control. • Figure 1–12 shows how these buses interconnect various system components.

  16. Figure 1–12  The block diagram of a computer system showing the address, data, and control bus structure.

  17. The address bus requests a memory location from the memory or an I/O location from the I/O devices. • if I/O is addressed, the address bus contains a 16-bit I/O address from 0000H through FFFFH. • if memory is addressed, the bus contains a memory address, varying in width by type ofmicroprocessor. • 64-bit extensions to Pentium provide 40 address pins, allowing up to 1T byte of memory to be accessed.

  18. The data bus transfers information between the microprocessor and its memory and I/O address space. • Data transfers vary in size, from 8 bits wide to 64 bits wide in various Intel microprocessors. • 8088 has an 8-bit data bus that transfers 8 bitsof data at a time • 8086, 80286, 80386SL, 80386SX, and 80386EX transfer 16 bits of data • 80386DX, 80486SX, and 80486DX, 32 bits • Pentium through Core2 microprocessors transfer 64 bits of data

  19. Organization of 8088 Address bus (20 bits) AH AL General purpose register BH BL CH CL Execution Unit (EU) DH DL Data bus (16 bits) SP CS Segment register BP DS SI SS DI ALU Data bus (16 bits) ES IP Bus control  ALU Instruction Queue External bus EU control Flag register Bus Interface Unit (BIU)

  20. 15 8 7 0 AX AH AL Accumulator BX BH BL Base Data Group CX Counter CH CL DX DH DL Data SP Stack Pointer Base Pointer BP Pointer and Index Group SI Source Index DI Destination Index General Purpose Registers

  21. Microprocessors A B n bits n bits Carry Y= 0 ? F A > B ? Y Arithmetic Logic Unit (ALU) F Y 0 0 0 A + B 0 0 1 A - B 0 1 0 A - 1 0 1 1 A and B 1 0 0 A or B 1 0 1 not A       • Signal F control which function will be conducted by ALU. • Signal F is generated according to the current instruction. • Basic arithmetic operations: addition, subtraction, • Basic logic operations: and, or, xor, shifting,

  22. 15 0  OF DF IF TF SF ZF  AF  PF  CF Flag Register • Flag register contains information reflecting the current status of a microprocessor. It also contains information which controls the operation of the microprocessor.   • Status Flags • Control Flags CF: Carry flag PF: Parity flag AF: Auxiliary carry flag ZF: Zero flag SF: Sign flag OF: Overflow flag IF: Interrupt enable flag DF: Direction flag TF: Trap flag

  23. Instruction Machine Codes • Instruction machine codes are binary numbers • For Example: 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 MOV AL, BL Register mode MOV • Machine code structure Opcode Mode Operand1 Operand2 • Some instructions do not have operands, or have only one operand • Opcode tells what operation is to be performed. • EU control logic generates ALU control signals according to Opcode) • Mode indicates the type of a instruction: Register type, or Memory type • Operands tell what data should be used in the operation. Operands can be addresses telling where to get data (or where to store results)

  24. EU Operation 1. Fetch an instruction from instruction queue 2. According to the instruction, EU control logic generates control signals. (This process is also referred to as instruction decoding) 3. Depending on the control signal, EU performs one of the following operations: • An arithmetic operation • A logic operation • Storing a datum into a register • Moving a datum from a register • Changing flag register

  25. Registers • A register is a storage element inside a microprocessor. • Almost all operations would involve using registers. • Some registers are general purpose registers, while others have special purposes. • General purpose registers can hold various data sizes and used for almost any purpose as dictated by the program. • However, each general purpose register does have its own special purposes.

  26. Registers

  27. Registers • Since the x86 instruction set is designed to be compatible with previous microprocessors, the same register can be accessed using different names. • Different names are given for 64-bit, 32-bit, 16-bit and 8-bit version of the same register.

  28. General Purpose Registers • RAX, EAX, AX (AH & AL) • A general purpose register • Also an accumulator – stores intermediate results after arithmetic and logic operations • Can also hold the offset address of a location in memory (80386 and above) • RBX, EBX, BX (BH & BL) • A general purpose register • Also a base index register – holds the offset address of a location in memory • Can also address memory data (80386 and above)

  29. General Purpose Registers • RCX, ECX, CX (CH & CL) • A general purpose register • Also a count register – holds the count for various instructions • Can also hold the offset address of a location in memory (80386 and above) • RDX, EDX, DX (DH & DL) • A general purpose register • Also a data register – stores data related to accumulator’s calculation (multiply and divide) • Can also address memory data (80386 and above)

  30. General Purpose Registers • RBP, EBP, BP • A general purpose register • Also a base pointer register – points to a memory location for memory data transfer • RDI, EDI, DI • A general purpose register • Also a destination index register – holds the memory address for the destination data of a string instruction

  31. General Purpose Registers • RSI, ESI, SI • A general purpose register • Also a source index register - holds the memory address for the source data of a string instruction • R8 through R15 • General purpose registers • Found only in 64-bit microprocessors • Data are addressed in 64-, 32-, 16-, or 8-bitsizes

  32. Special Purpose Registers • RIP, EIP, IP • Instruction pointer – points to the next instruction in the memory to be executed • RSP, ESP, SP • Stack pointer – points to an area in memory called the stack • RFLAGS, EFLAGS, FLAGS • Indicates the condition of the microprocessor and control its operation

  33. Flags

  34. Flags • The C, P, A, Z, S and O flags are changed by most arithmetic and logic operations. • Flags never change for any data transfer or program control operations. • Some flags are also used to control features found in the microprocessor.

  35. Flags • Descriptions for some of the flag bits: • C (carry): holds the carry after addition or borrow after subtraction. • P (parity): the count of 1s in a number expressed as even or odd. • 0 for odd, 1 for even. • A (auxiliary carry): holds the half-carry after addition or the borrow after subtraction between bit positions 3 and 4 of the result.

  36. Flags • Z (zero): shows that the result of an arithmetic or logic operation is zero. • 0 result is not zero, 1 result is zero. • S (sign): holds the arithmetic sign of the result after an arithmetic or logic instruction executes. • 0 for positive, 1 for negative. • T (trap): enables trapping through an on-chip debugging feature. • 0 disable trapping, 1 enable trapping. • If enabled, allows the microprocessor to interrupt the flow of the program on conditions indicated by the debug registers and control registers. • Microsoft Visual Studio debugging tool uses this feature.

  37. Flags • I (interrupt): control the operation of the INTR (interrupt request) input pin. • 0 disables INTR pin, 1 enables INTR pin. • D (direction): selects increment or decrement mode for SI/DI registers. • 0 increment, 1 decrement. • O (overflow): indicates that the result of an addition/subtraction of signed numbers exceeded the capacity of the machine.

More Related