8086 Microprocessor(Visit Munnuz Co Cc)

6

Click here to load reader

description

simple architecture of 8086 Microprocessor

Transcript of 8086 Microprocessor(Visit Munnuz Co Cc)

Page 1: 8086 Microprocessor(Visit Munnuz Co Cc)

Intel 8086 Assembly language ProgrammingHistoryIntelrsquos first 16-bit CPU was the 8086 A version of the 8086 that used an 8-bit data busthe 8088 was released later to permit lower-cost designs The 8088 was used in the verypopular IBM PC and many later compatible machinesIntelrsquos first 32-bit CPU was the 80386 It was designed to be backwards compatible withthe large amount of software which was available for the 8086 The 80386 extended thedata and address registers to 32 bits The Intel rsquo386 also included a sophisticated memorymanagement architecture that allowed virtual memory and memory protection to beimplemented This same basic 80386 architecture is used in the Pentium series andcompatible processors

ProcessorModel

RegisterWidth

Data BusWidth

Address BusWidth

8086 16 16 208088 16 8 20i386 32 32 32i386SX 32 16 24i386EX 3 32 16 24Pentium 32 64 32

Features of 8086- 8086 is a 16bit processor Itrsquos ALU internal registers works with 16bit binaryword- 8086 has a 16bit data bus It can read or write data to a memoryport either 16bitsor 8 bit at a time- 8086 has a 20bit address bus which means it can address upto 220 = 1MB memorylocation- Frequency range of 8086 is 6-10 MHz

Internal Architecture of 8086

RegistersThe 8086 includes four general-purpose 16-bit data registers (AX BX CX and DX)These registers can be used in arithmetic or logic operations and as temporary storageThe mostleast significant byte of each register can also be addressed directly (eg ALis the LS byte of AX CH is MS byte of CX etc)Each register has also has a special purpose as shown belowRegister Special PurposeAX multiplydivideBX index register for MOVECX count register for string operationsDX port address for IN and OUT

There is a 16-bit program flags register Three of the bits indicate whether the result ofthe most recent arithmeticlogical instruction was zero (ZF) has a negative sign (SF) orgenerated a carry or borrow (CF) from the most-significant bit The overflow bit (OF)indicates overflow if the operands are signed (itrsquos the carryborrow from the second mostsignificantbit) A fourth bit the interrupt enable bit (IF) controls whether maskableinterrupt requests (on the IRQ pin) are recognized

0 16X X X X O D I T S Z X A X P X C

MEMORY SEGMENTATION

Advantages of memory segmentation 1048698Allow the memory capacity to be 1Mb even though the addresses associated with the individual instructions are only 16 bits wide1048698Facilitate the use of separate memory areas for the program its data and the stack1048698Permit a program andor its data to be put into different areas of memory each time the program is executed1048698Multitasking becomes easy

SegmentOffset Addressing

Since address registers and address operands are only 16 bits they can only address 64kbytes In order to address the 20-bit address range of the 8086 physical addresses (thosethat are put on the address bus) are always formed by adding the values of one of thesegment registers to the 16-bit ldquooffsetrdquo address to form a 20-bit addressThe segment registers themselves only contain the most-significant 16 bits of the 20-bitvalue that is contributed by the segment registers The least significant four bits of thesegment address are always zeroBy default the DS (data segment) register is used to form addresses associated with datatransfer instructions (eg MOV) the CS (code segment) register is added to the IPregister (eg for JMP or CALL) and SS is added to SP (eg PUSH or to saverestoreaddresses during CALLRET or INT instructions) There is also an ldquoextrardquo segmentregister ES that is used when access to other locations in memory is required

PIN OUT OF 8086

Page 2: 8086 Microprocessor(Visit Munnuz Co Cc)

RegistersThe 8086 includes four general-purpose 16-bit data registers (AX BX CX and DX)These registers can be used in arithmetic or logic operations and as temporary storageThe mostleast significant byte of each register can also be addressed directly (eg ALis the LS byte of AX CH is MS byte of CX etc)Each register has also has a special purpose as shown belowRegister Special PurposeAX multiplydivideBX index register for MOVECX count register for string operationsDX port address for IN and OUT

There is a 16-bit program flags register Three of the bits indicate whether the result ofthe most recent arithmeticlogical instruction was zero (ZF) has a negative sign (SF) orgenerated a carry or borrow (CF) from the most-significant bit The overflow bit (OF)indicates overflow if the operands are signed (itrsquos the carryborrow from the second mostsignificantbit) A fourth bit the interrupt enable bit (IF) controls whether maskableinterrupt requests (on the IRQ pin) are recognized

0 16X X X X O D I T S Z X A X P X C

MEMORY SEGMENTATION

Advantages of memory segmentation 1048698Allow the memory capacity to be 1Mb even though the addresses associated with the individual instructions are only 16 bits wide1048698Facilitate the use of separate memory areas for the program its data and the stack1048698Permit a program andor its data to be put into different areas of memory each time the program is executed1048698Multitasking becomes easy

SegmentOffset Addressing

Since address registers and address operands are only 16 bits they can only address 64kbytes In order to address the 20-bit address range of the 8086 physical addresses (thosethat are put on the address bus) are always formed by adding the values of one of thesegment registers to the 16-bit ldquooffsetrdquo address to form a 20-bit addressThe segment registers themselves only contain the most-significant 16 bits of the 20-bitvalue that is contributed by the segment registers The least significant four bits of thesegment address are always zeroBy default the DS (data segment) register is used to form addresses associated with datatransfer instructions (eg MOV) the CS (code segment) register is added to the IPregister (eg for JMP or CALL) and SS is added to SP (eg PUSH or to saverestoreaddresses during CALLRET or INT instructions) There is also an ldquoextrardquo segmentregister ES that is used when access to other locations in memory is required

PIN OUT OF 8086

Page 3: 8086 Microprocessor(Visit Munnuz Co Cc)

MEMORY SEGMENTATION

Advantages of memory segmentation 1048698Allow the memory capacity to be 1Mb even though the addresses associated with the individual instructions are only 16 bits wide1048698Facilitate the use of separate memory areas for the program its data and the stack1048698Permit a program andor its data to be put into different areas of memory each time the program is executed1048698Multitasking becomes easy

SegmentOffset Addressing

Since address registers and address operands are only 16 bits they can only address 64kbytes In order to address the 20-bit address range of the 8086 physical addresses (thosethat are put on the address bus) are always formed by adding the values of one of thesegment registers to the 16-bit ldquooffsetrdquo address to form a 20-bit addressThe segment registers themselves only contain the most-significant 16 bits of the 20-bitvalue that is contributed by the segment registers The least significant four bits of thesegment address are always zeroBy default the DS (data segment) register is used to form addresses associated with datatransfer instructions (eg MOV) the CS (code segment) register is added to the IPregister (eg for JMP or CALL) and SS is added to SP (eg PUSH or to saverestoreaddresses during CALLRET or INT instructions) There is also an ldquoextrardquo segmentregister ES that is used when access to other locations in memory is required

PIN OUT OF 8086

Page 4: 8086 Microprocessor(Visit Munnuz Co Cc)

SegmentOffset Addressing

Since address registers and address operands are only 16 bits they can only address 64kbytes In order to address the 20-bit address range of the 8086 physical addresses (thosethat are put on the address bus) are always formed by adding the values of one of thesegment registers to the 16-bit ldquooffsetrdquo address to form a 20-bit addressThe segment registers themselves only contain the most-significant 16 bits of the 20-bitvalue that is contributed by the segment registers The least significant four bits of thesegment address are always zeroBy default the DS (data segment) register is used to form addresses associated with datatransfer instructions (eg MOV) the CS (code segment) register is added to the IPregister (eg for JMP or CALL) and SS is added to SP (eg PUSH or to saverestoreaddresses during CALLRET or INT instructions) There is also an ldquoextrardquo segmentregister ES that is used when access to other locations in memory is required

PIN OUT OF 8086