Danh mục

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    
Thu Hiền

Phí tải xuống: 8,000 VND Tải xuống file đầy đủ (36 trang) 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)

Tài liệu được xem nhiều: