Bài giảng Computer Organization and Architecture: Chapter 11
Số trang: 36
Loại file: ppt
Dung lượng: 467.50 KB
Lượt xem: 15
Lượt tải: 0
Xem trước 4 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Cùng tìm hiểu Addressing Modes; Immediate Addressing; Immediate Addressing Diagram; Direct Addressing;... được trình bày cụ thể trong "Bài giảng Computer Organization and Architecture: Chapter 11 - Instruction Sets: Addressing Modes and Formats".
Nội dung trích xuất từ tài liệu:
Bài giảng Computer Organization and Architecture: Chapter 11William StallingsComputer Organizationand Architecture6th EditionChapter 11Instruction Sets:Addressing Modesand FormatsAddressing Modes• Immediate• Direct• Indirect• Register• RegisterIndirect• Displacement(Indexed)• StackImmediate Addressing• Operandispartofinstruction• Operand=addressfield• e.g.ADD5 —Add5tocontentsofaccumulator —5isoperand• Nomemoryreferencetofetchdata• Fast• LimitedrangeImmediate Addressing Diagram Instruction Opcode OperandDirect Addressing• Addressfieldcontainsaddressofoperand• Effectiveaddress(EA)=addressfield(A)• e.g.ADDA —AddcontentsofcellAtoaccumulator —LookinmemoryataddressAforoperand• Singlememoryreferencetoaccessdata• Noadditionalcalculationstoworkouteffective address• LimitedaddressspaceDirect Addressing Diagram Instruction Opcode AddressA Memory OperandIndirect Addressing (1)• Memorycellpointedtobyaddressfieldcontains theaddressof(pointerto)theoperand• EA=(A) —LookinA,findaddress(A)andlooktherefor operand• e.g.ADD(A) —AddcontentsofcellpointedtobycontentsofAto accumulatorIndirect Addressing (2)• Largeaddressspace• 2nwheren=wordlength• Maybenested,multilevel,cascaded —e.g.EA=(((A))) – Drawthediagramyourself• Multiplememoryaccessestofindoperand• HenceslowerIndirect Addressing Diagram InstructionOpcode AddressA Memory Pointertooperand OperandRegister Addressing (1)• Operandisheldinregisternamedinaddress filed• EA=R• Limitednumberofregisters• Verysmalladdressfieldneeded —Shorterinstructions —FasterinstructionfetchRegister Addressing (2)• Nomemoryaccess• Veryfastexecution• Verylimitedaddressspace• Multipleregistershelpsperformance —Requiresgoodassemblyprogrammingorcompiler writing —N.B.Cprogramming – registerinta;• c.f.DirectaddressingRegister Addressing Diagram Instruction Opcode RegisterAddressR Registers OperandRegister Indirect Addressing• C.f.indirectaddressing• EA=(R)• Operandisinmemorycellpointedtoby contentsofregisterR• Largeaddressspace(2n)• Onefewermemoryaccessthanindirect addressingRegister Indirect Addressing Diagram Instruction Opcode RegisterAddressR Memory Registers PointertoOperand OperandDisplacement Addressing• EA=A+(R)• Addressfieldholdtwovalues —A=basevalue —R=registerthatholdsdisplacement —orviceversaDisplacement Addressing Diagram Instruction Opcode RegisterR AddressA Memory Registers PointertoOperand + OperandRelative Addressing• Aversionofdisplacementaddressing• R=Programcounter,PC• EA=A+(PC)• i.e.getoperandfromAcellsfromcurrent locationpointedtobyPC• c.flocalityofreference&cacheusageBase-Register Addressing• Aholdsdisplacement• Rholdspointertobaseaddress• Rmaybeexplicitorimplicit• e.g.segmentregistersin80x86Indexed Addressing• A=base• R=displacement• EA=A+R• Goodforaccessingarrays —EA=A+R —R++Combinations• Postindex• EA=(A)+(R)• Preindex• EA=(A+(R))• (Drawthediagrams)
Nội dung trích xuất từ tài liệu:
Bài giảng Computer Organization and Architecture: Chapter 11William StallingsComputer Organizationand Architecture6th EditionChapter 11Instruction Sets:Addressing Modesand FormatsAddressing Modes• Immediate• Direct• Indirect• Register• RegisterIndirect• Displacement(Indexed)• StackImmediate Addressing• Operandispartofinstruction• Operand=addressfield• e.g.ADD5 —Add5tocontentsofaccumulator —5isoperand• Nomemoryreferencetofetchdata• Fast• LimitedrangeImmediate Addressing Diagram Instruction Opcode OperandDirect Addressing• Addressfieldcontainsaddressofoperand• Effectiveaddress(EA)=addressfield(A)• e.g.ADDA —AddcontentsofcellAtoaccumulator —LookinmemoryataddressAforoperand• Singlememoryreferencetoaccessdata• Noadditionalcalculationstoworkouteffective address• LimitedaddressspaceDirect Addressing Diagram Instruction Opcode AddressA Memory OperandIndirect Addressing (1)• Memorycellpointedtobyaddressfieldcontains theaddressof(pointerto)theoperand• EA=(A) —LookinA,findaddress(A)andlooktherefor operand• e.g.ADD(A) —AddcontentsofcellpointedtobycontentsofAto accumulatorIndirect Addressing (2)• Largeaddressspace• 2nwheren=wordlength• Maybenested,multilevel,cascaded —e.g.EA=(((A))) – Drawthediagramyourself• Multiplememoryaccessestofindoperand• HenceslowerIndirect Addressing Diagram InstructionOpcode AddressA Memory Pointertooperand OperandRegister Addressing (1)• Operandisheldinregisternamedinaddress filed• EA=R• Limitednumberofregisters• Verysmalladdressfieldneeded —Shorterinstructions —FasterinstructionfetchRegister Addressing (2)• Nomemoryaccess• Veryfastexecution• Verylimitedaddressspace• Multipleregistershelpsperformance —Requiresgoodassemblyprogrammingorcompiler writing —N.B.Cprogramming – registerinta;• c.f.DirectaddressingRegister Addressing Diagram Instruction Opcode RegisterAddressR Registers OperandRegister Indirect Addressing• C.f.indirectaddressing• EA=(R)• Operandisinmemorycellpointedtoby contentsofregisterR• Largeaddressspace(2n)• Onefewermemoryaccessthanindirect addressingRegister Indirect Addressing Diagram Instruction Opcode RegisterAddressR Memory Registers PointertoOperand OperandDisplacement Addressing• EA=A+(R)• Addressfieldholdtwovalues —A=basevalue —R=registerthatholdsdisplacement —orviceversaDisplacement Addressing Diagram Instruction Opcode RegisterR AddressA Memory Registers PointertoOperand + OperandRelative Addressing• Aversionofdisplacementaddressing• R=Programcounter,PC• EA=A+(PC)• i.e.getoperandfromAcellsfromcurrent locationpointedtobyPC• c.flocalityofreference&cacheusageBase-Register Addressing• Aholdsdisplacement• Rholdspointertobaseaddress• Rmaybeexplicitorimplicit• e.g.segmentregistersin80x86Indexed Addressing• A=base• R=displacement• EA=A+R• Goodforaccessingarrays —EA=A+R —R++Combinations• Postindex• EA=(A)+(R)• Preindex• EA=(A+(R))• (Drawthediagrams)
Tìm kiếm theo từ khóa liên quan:
Bài giảng Computer Organization and Architecture Computer Organization and Architecture Bộ hướng dẫn Các chế độ địa chỉ Định dạng chế độ Tìm hiểu bộ chỉ dẫnGợi ý tài liệu liên quan:
-
Bài giảng Computer Organization and Architecture: Chapter 1
18 trang 28 0 0 -
Ebook Computer organization and architecture: Designing for performance (Tenth edition)
864 trang 23 0 0 -
Computer organization and Architecture ninth edition - William Stallings
787 trang 21 0 0 -
Bài giảng Computer Organization and Architecture: Chapter 4
53 trang 18 0 0 -
Bài giảng Computer Organization and Architecture: Chapter 2
53 trang 16 0 0 -
Ebook Computer organization and architecture: Designing for performance (6th ed ): Part 1
586 trang 16 0 0 -
Bài giảng Computer Organization and Architecture: Chapter 18
62 trang 15 0 0 -
Bài giảng Computer Organization and Architecture: Chapter 12
59 trang 15 0 0 -
Bài giảng Computer Organization and Architecture: Chapter 13
38 trang 14 0 0 -
125 trang 13 0 0