Вы находитесь на странице: 1из 16

The 8086 Computer Architectu re and Hardware Compone nts

Submitted by:

Ronel Cortez

HARDWARE COMPONENTS The hardware are the parts of the computer itself including the Central Processing Unit (CPU) and related microchips and micro-circuitry, keyboards, monitors, case and drives (hard, CD, DVD, floppy, optical, tape, etc..). Other extra parts called peripheral components or devices include mouse, printers, modems, scanners, digital cameras and cards (sound, colour, video etc.). Together they are often refers to as a personal computer. Central Processing Unit (CPU): However, the term relates to a specific chip or the rest of the computers circuitry and chips determines the processor a CPUs performance. Currently the Pentium chip or processor, made by Intel, is the most common CPU though there are many other companies that produce processors for personal computers. Examples are the CPU made by Motorola and AD. With faster processors, the clock speed becomes more important. Compared to some of the first computers, which operated at below 30 megahertz (MHz) the Pentium, chips began at 75 MHz in the late 1990s. Speeds now exceed 300+ MHz or 3 Gigahertz (GHz) and different chip manufacturers use different measuring standards (check your local computer store for the latest speed). It depends on the circuit board that the chip was housed in, or the motherboard, as to whether you are able to upgrade to a faster chip. The motherboard contains the circuitry and connections that allow the various components to communicate with each other. Keyboard: The keyboard is used to type information into the computer or input information. There are many different keyboard layouts and sizes with the most common for Latin based languages being the QWERTY layout (named for the first six keys). The standard keyboard has 101 keys. Notebooks have embedded keys accessible by special keys or by pressing key combinations (CTRL or Command and P for example). Ergonomically designed keyboards are designed to make typing easier. Hand held devices have various and different keyboard configurations and touch screens. Removable Storage and/or Disk Drives: All disks need to get information off or read and put information on the disk or write. Each drive is designed for a specific type of disk whether it is a CD, DVD, hard disk or floppy. Often the term Disk and Drive are used to describe the

same thing but it helps to understand that the disk is the storage device, which contains computer files or software, and the drive is the mechanism that runs the disk. Digital Flash Drives: Works slightly differently as they use memory cards to store information so there are no moving parts. Digital cameras also use Flash memory cards to store information, in this case photographs. Hand held devices use digital drives and many use removable built in memory cards.

Mouse: Most modern computers today are run using a mouse-controlled pointer. Generally if the mouse has two buttons the left one is used to select objects and text and the right one is used to access menus. If the mouse has on button (Mac for instance) it controls all the activity and a mouse with a third button can be used by specific software programs. Monitors: A monitor or display (sometimes called a visual display unit) is an electronic visual display for computers. The monitor comprises the display device, circuitry, and an enclosure. The display device in modern monitors is typically a thin film transistor liquid crystal display (TFT-LCD) thin panel, while older monitors use a cathode ray tube about as deep as the screen size. Motherboard: The motherboard is the main component inside the case. It is a large rectangular board with integrated circuitry that connects the rest of the parts of the computer including the CPU, the RAM, the disk drives (CD, DVD, hard disk, or any others) as well as any peripherals connected via the ports or the expansion slots. Components directly attached to the motherboard include:

The central processing unit (CPU) performs most of the calculations which enable a computer to function, and is sometimes referred to as the "brain" of the computer. It is usually cooled by a heat sink and fan. The chip set mediates communication between the CPU and the other components of the system, including main memory. RAM (Random Access Memory) stores resident part of the current running OS (OS core and so on) and all running processes (application parts, using CPU or input/output (I/O) channels or waiting for CPU or I/O channels). The BIOS includes boot firmware and power management. The Basic Input Output System tasks are handled by operating system drivers.

Internal Buses connect the CPU to various internal components and to expansion cards for graphics and sound. o Current The north bridge memory controller, for RAM and PCI Express PCI Express, for expansion cards such as graphics and physics processors, and high-end network interfaces PCI, for other expansion cards SATA, for disk drives ATA o Obsolete AGP (superseded by PCI Express) VLB VESA Local Bus (superseded by AGP) ISA (expansion card slot format obsolete in PCs, but still used in industrial computers) External Bus Controllers support ports for external peripherals. These ports may be controlled directly by the south bridge I/O controller or based on expansion cards attached to the motherboard through the PCI bus. o USB o FireWire o SATA o SCSI

Power supply: A power supply unit (PSU) converts alternating current (AC) electric power to low-voltage DC power for the internal components of the computer. Some power supplies have a switch to change between 230 V and 115 V. Other models have automatic sensors that switch input voltage automatically, or are able to accept any voltage between those limits. Power supply units used in computers are nearly always switch mode power supplies (SMPS). The SMPS provides regulated direct current power at the several voltages required by the motherboard and accessories such as disk drives and cooling fans. Removable media devices: CD (compact disc) - the most common type of removable media, suitable for music and data. o CD-ROM Drive - a device used for reading data from a CD. o CD Writer - a device used for both reading and writing data to and from a CD. DVD (digital versatile disc) - a popular type of removable media that is the same dimensions as a CD but stores up to 12 times as much information. It is the most common way of transferring digital video, and is popular for data storage.

DVD-ROM Drive - a device used for reading data from a DVD. DVD Writer - a device used for both reading and writing data to and from a DVD. o DVD-RAM Drive - a device used for rapid writing and reading of data from a special type of DVD. Blu-ray Disc - a high-density optical disc format for data and highdefinition video. It can store 70 times as much information as a CD. o BD-ROM Drive - a device used for reading data from a Blu-ray disc. o BD Writer - a device used for both reading and writing data to and from a Blu-ray disc. o HD DVD - a discontinued competitor to the Blu-ray format. Floppy disk - an outdated storage device consisting of a thin disk of a flexible magnetic storage medium. Used today mainly for loading RAID drivers. Iomega Zip drive - an outdated medium-capacity removable disk storage system, first introduced by Iomega in 1994. USB flash drive - a flash memory data storage device integrated with a USB interface, typically small, lightweight, removable, and rewritable. Capacities vary, from hundreds of megabytes (in the same ballpark as CDs) to tens of gigabytes (surpassing, at great expense, Blu-ray discs). Tape drive - a device that reads and writes data on a magnetic tape, used for long-term storage and backups. o o

Sound card: Enables the computer to output sound to audio devices, as well as accept input from a microphone. Most modern computers have sound cards built-in to the motherboard, though it is common for a user to install a separate sound card as an upgrade. Most sound cards, either built-in or added, have surround sound capabilities. Input and output peripherals: Input and output devices are typically housed externally to the main computer chassis. The following are either standard or very common to many computer systems. Input: Text input devices o Keyboard - a device to input text and characters by depressing buttons (referred to as keys or buttons). Pointing devices o Mouse - a pointing device that detects two-dimensional motion relative to its supporting surface. Optical Mouse - uses light to determine mouse motion. Trackball - a pointing device consisting of an exposed protruding ball housed in a socket that detects rotation about two axes.

o Touchscreen - senses the user pressing directly on the display Gaming devices o Joystick - a control device that consists of a handheld stick that pivots around one end, to detect angles in two or three dimensions and reports its angle or direction to the device it is controlling. o Game pad - a hand held game controller that relies on the digits (especially thumbs) to provide input. o Game controller - a specific type of controller specialized gaming purposes.

Image, Video input devices: Image scanner - a device that provides input by analyzing images, printed text, handwriting, or an object. Web cam - a video camera used to provide visual input that can be easily transferred over the internet. Audio input devices: Microphone - an acoustic sensor that provides input by converting sound into electrical signals. Output: Speakers - typically a pair of devices (2 channels) which convert electrical signals into audio. Printer - a device that produces a permanent human-readable text of graphic document. Headphones - for a single user hearing the audio. Monitor : An electronic visual display with textual and graphical information from the computer. CRT - (Cathode Ray Tube) display LCD - (Liquid Crystal Display) as of 2010, it is the primary visual display for personal computers. LED - (light-emitting diode) display OLED - Organic Light-Emitting Diode *** MICROCOMPUTER ARCHITECTURE MICROCOMPUTER is usually assembled from a microprocessor chip (CPU) connected to memory chips and I/O chips. *CPU The brain and the arithmetic unit of the computer. *I/O chips Used to allow the CPU to interface with peripherals (keyboard, printer, etc).

FIVE BASIC UNITS OF A MICROCOMPUTER SYSTEM Arithmetic Logic Unit (ALU) - performs arithmetic operations such as addition, subtraction, multiplication, and or division, and logical operation such as AND, OR, NOT and XOR needed to carry out the instructions. Control Unit (CU) - responsible for fetching instructions from main memory and determining their type. Memory Unit (MU) * - used to store information such as number or character data. Input Unit (IU) - used to input the information to be processed from external input device such as a card reader, keyboard, or switch. Output Unit (OU) - used to output the processed results of computer to the external output devices such as a printer, monitor, 7- segment display, and LED. MEMORY UNIT Primary Storage Memory RAM (Random-Access Memory) - By using RAM, the information is made volatile; that is, the information is lost if power is turned off. ROM (Read-Only Memory) - By using ROM, the information is made nonvolatile; that is, the information is not lost if power is turned off. BUS collection of wires used to transmit signals in parallel. THREE TYPES OF BUSES Address Bus - The unidirectional address bus transmits the address signals emitted from CPU to memory and I/O port. Data Bus - The signal on the bidirectional data bus is the data from CPU either to memory and I/O or from memory and I/O to CPU. Control Bus - used to transmit the control signals such as read, write, and interrupt control signal. *** 8086 ARCHITECTURE Memory Interface

Has 2 processors, the term architecture, as used in microprocessor circuits, describes the Functional components that make up the MPU and the interaction between them. These include the temporary storage devices known as registers, which are used to hold data, instructions, and status information. There are also devices to perform arithmetic and logical operations. Control devices re used to control the flow of information through the MPU. BIU Its name comes from the fact that it deals with moving information over the processor data bus, the primary conduit for the transfer of information to and from the CPU. The bus interface unit is responsible for responding to all signals that go to the processor, and generating all signals that go from the processor to other parts of the system.

Eu Receives instructions from the BIU executes and stores the results in the general registers, by passing back the data back to the BIU data can also be stored in a memory location or written to an output device ALU The ALU is the calculator part of the execution unit. It consists of Electronic circuitry that performs arithmetic operations or logical operations on the Binary represented electrical signals. The control system for the execution unit can also be thought of as part of ALU. It provides a path for the flow of instructions into the ALU, the general registers, and the flag register. GENERAL PURPOSE REGISTERS 8086 has 8 general purpose registers, each register has its own name: AX - the accumulator register (divided into AH / AL): o Generates shortest machine code o Arithmetic, logic and data transfer o One number must be in AL or AX o Multiplication & Division o Input & Output BX - the base address register (divided into BH / BL). CX - the count register (divided into CH / CL): o Iterative code segments using the LOOP instruction o Repetitive operations on strings with the REP command o Count (in CL) of bits to shift and rotate DX - the data register (divided into DH / DL): o DX:AX concatenated into 32-bit register for some MUL and DIV operations o Specifying ports in some IN and OUT operations SI - source index register: o Can be used for pointer addressing of data o Used as source in some string processing instructions o Offset address relative to DS DI - destination index register: o Can be used for pointer addressing of data o Used as destination in some string processing instructions o Offset address relative to ES

BP - base pointer: o Primarily used to access parameters passed via the stack o Offset address relative to SS SP - stack pointer: o Always points to top item on the stack o Offset address relative to SS o Always points to word (byte at even address) o An empty stack will had SP = FFFEh SEGMENT REGISTERS

CS - points at the segment containing the current program. DS - generally points at segment where variables are defined. ES - extra segment register, it's up to a coder to define its usage. SS - points at the segment containing the stack. Although it is possible to store any data in the segment registers, this is never a good idea. The segment registers have a very special purpose - pointing at accessible blocks of memory. Segment registers work together with general-purpose register to access any memory value. For example if we would like to access memory at the physical address 12345h (hexadecimal), we could set the DS = 1230h and SI = 0045h. This way we can access much more memory than with a single register, which is limited to 16 bit values. The CPU makes a calculation of the physical address by multiplying the segment register by 10h and adding the general purpose register to it (1230h * 10h + 45h = 12345h): The address formed with 2 registers is called an effective address. By default BX, SI and DI registers work with DS segment register; BP and SP work with SS segment register. Other general purpose registers cannot form an effective address. Also, although BX can form an effective address, BH and BL cannot.

SPECIAL PURPOSE REGISTERS IP - the instruction pointer: Always points to next instruction to be executed Offset address relative to CS IP register always works together with CS segment register and it points to currently executing instruction. FLAGS REGISTER Flags Register - determines the current state of the processor. They are modified automatically by CPU after mathematical operations, this allows to determine the type of the result, and to determine conditions to transfer control to other parts of the program. Generally you cannot access these registers directly. Carry Flag (CF) - this flag is set to 1 when there is an unsigned overflow. For example when you add bytes 255 + 1 (result is not in range 0...255). When there is no overflow this flag is set to 0. Parity Flag (PF) - this flag is set to 1 when there is even number of one bits in result, and to 0 when there is odd number of one bits. Auxiliary Flag (AF) - set to 1 when there is an unsigned overflow for low nibble (4 bits). Zero Flag (ZF) - set to 1 when result is zero. For non-zero result this flag is set to 0. Sign Flag (SF) - set to 1 when result is negative. When result is positive it is set to 0. (This flag takes the value of the most significant bit.) Trap Flag (TF) - Used for on-chip debugging. Interrupt enable Flag (IF) - when this flag is set to 1 CPU reacts to interrupts from external devices. Direction Flag (DF) - this flag is used by some instructions to process data chains, when this flag is set to 0 - the processing is done forward, when this flag is set to 1 the processing is done backward. Overflow Flag (OF) - set to 1 when there is a signed overflow. For example, when you add bytes 100 + 50 (result is not in range -128...127). *** Memory Program, data and stack memories occupy the same memory space. The total addressable memory size is 1MB KB. As the most of the processor instructions use 16-bit pointers the processor can effectively address only 64 KB of memory. To access memory outside of 64 KB the CPU uses special segment registers to specify where the code, stack and data 64 KB segments are positioned within 1 MB of memory (see the "Registers" section below). 16-bit pointers and data are stored as: address: low-order byte address+1: high-order byte

32-bit addresses are stored in "segment: offset" format as: address: low-order byte of segment address+1: high-order byte of segment address+2: low-order byte of offset address+3: high-order byte of offset Physical memory address pointed by segment:offset pair is calculated as: address = (<segment> * 16) + <offset> Program memory - program can be located anywhere in memory. Jump and call instructions can be used for short jumps within currently selected 64 KB code segment, as well as for far jumps anywhere within 1 MB of memory. All conditional jump instructions can be used to jump within approximately +127 -127 bytes from current instruction. Data memory - the 8086 processor can access data in any one out of 4 available segments, which limits the size of accessible memory to 256 KB (if all four segments point to different 64 KB blocks). Accessing data from the Data, Code, Stack or Extra segments can be usually done by prefixing instructions with the DS:, CS:, SS: or ES: (some registers and instructions by default may use the ES or SS segments instead of DS segment). Word data can be located at odd or even byte boundaries. The processor uses two memory accesses to read 16-bit word located at odd byte boundaries. Reading word data from even byte boundaries requires only one memory access. Stack memory can be placed anywhere in memory. The stack can be located at odd memory addresses, but it is not recommended for performance reasons (see "Data Memory" above). Reserved locations: 0000h - 03FFh are reserved for interrupt vectors. Each interrupt vector is a 32bit pointer in format segment:offset. FFFF0h - FFFFFh - after RESET the processor always starts program execution at the FFFF0h address. Interrupts The processor has the following interrupts: INTR is a maskable hardware interrupt. The interrupt can be enabled/disabled using STI/CLI instructions or using more complicated method of updating the FLAGS register with the help of the POPF instruction. When an interrupt occurs, the processor stores FLAGS register into stack, disables further interrupts,

fetches from the bus one byte representing interrupt type, and jumps to interrupt processing routine address of which is stored in location 4 * <interrupt type>. Interrupt processing routine should return with the IRET instruction. NMI is a non-maskable interrupt. Interrupt is processed in the same way as the INTR interrupt. Interrupt type of the NMI is 2, i.e. the address of the NMI processing routine is stored in location 0008h. This interrupt has higher priority than the maskable interrupt. Software interrupts can be caused by: INT instruction - breakpoint interrupt. This is a type 3 interrupt. INT <interrupt number> instruction - any one interrupt from available 256 interrupts. INTO instruction - interrupt on overflow Single-step interrupt - generated if the TF flag is set. This is a type 1 interrupt. When the CPU processes this, interrupt it clears TF flag before calling the interrupt processing routine. Processor exceptions: divide error (type 0), unused opcode (type 6) and escape opcode (type 7). Software interrupt processing is the same as for the hardware interrupts. I/O ports 65536 8-bit I/O ports. These ports can be also addressed as 32768 16-bit I/O ports. Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1 MB of processor memory these 4 segments are located the 8086 microprocessor uses four segment registers: Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions. Stack segment (SS) is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction. Data segment (DS) is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in

the data segment. DS register can be changed directly using POP and LDS instructions. Extra segment (ES) is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions. It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix. All general registers of the 8086 microprocessor can be used for arithmetic and logic operations. The general registers are: Accumulator register consists of 2 8-bit registers AL and AH, which can be combined together and used as a 16-bit register AX. AL in this case contains the low-order byte of the word, and AH contains the high-order byte. Accumulator can be used for I/O operations and string manipulation. Base register consists of 2 8-bit registers BL and BH, which can be combined together and used as a 16-bit register BX. BL in this case contains the loworder byte of the word, and BH contains the high-order byte. BX register usually contains a data pointer used for based, based indexed or register indirect addressing.

Count register consists of 2 8-bit registers CL and CH, which can be combined together and used as a 16-bit register CX. When combined, CL register contains the low-order byte of the word, and CH contains the high-order byte. Count register can be used as a counter in string manipulation and shift/rotate instructions. Data register consists of 2 8-bit registers DL and DH, which can be combined together and used as a 16-bit register DX. When combined, DL register contains the low-order byte of the word, and DH contains the high-order byte. Data register can be used as a port number in I/O operations. In integer 32-bit multiply and divide instruction the DX register contains high-order word of the initial or resulting number. The following registers are both general and index registers: Stack Pointer (SP) is a 16-bit register pointing to program stack. Base Pointer (BP) is a 16-bit register pointing to data in stack segment. BP register is usually used for based, based indexed or register indirect addressing. Source Index (SI) is a 16-bit register. SI is used for indexed, based indexed and register indirect addressing, as well as a source data address in string manipulation instructions. Destination Index (DI) is a 16-bit register. DI is used for indexed, based indexed and register indirect addressing, as well as a destination data address in string manipulation instructions. Other registers: Instruction Pointer (IP) is a 16-bit register. Instruction Set Instruction set of Intel 8086 processor consists of the following instructions: I. Data moving instructions. 1. Arithmetic - add, subtract, increment, decrement, convert byte/word and compare. 2. Logic - AND, OR, exclusive OR, shift/rotate and test. 3. String manipulation - load, store, move, compare and scan for byte/word. 4. Control transfer - conditional, unconditional, call subroutine and return from subroutine. II. Input/Output instructions: Other - setting/clearing flag bits, stack operations, software interrupts, etc.

III.

Addressing modes: 1. Implied - the data value/data address is implicitly associated with the instruction. 2. Register - references the data in a register or in a register pair. 3. Immediate - the data is provided in the instruction. 4. Direct - the instruction operand specifies the memory address where data is located. 5. Register indirect - instruction specifies a register containing an address, where data is located. This addressing mode works with SI, DI, BX and BP registers. 6. Based - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP), the resulting value is a pointer to location where data resides. 7. Indexed - 8-bit or 16-bit instruction operand is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides. 8. Based Indexed - the contents of a base register (BX or BP) is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides. 9. Based Indexed with displacement - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP) and index register (SI or DI), the resulting value is a pointer to location where data resides.

Вам также может понравиться