COA课件-大连交大-lyx_Ch_10.ppt_第1页
COA课件-大连交大-lyx_Ch_10.ppt_第2页
COA课件-大连交大-lyx_Ch_10.ppt_第3页
COA课件-大连交大-lyx_Ch_10.ppt_第4页
COA课件-大连交大-lyx_Ch_10.ppt_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

WilliamStallingsComputerOrganizationandArchitecture6thEdition Chapter10InstructionSets 指令集characteristicsandFunctions 汇编编码表示 10 1Machineinstructioncharacteristics ThecompletecollectionofinstructionsthatareunderstoodbyaCPUMachineCodeBinaryUsuallyrepresentedbyassemblycodes 1 Whatisaninstructionset 2 Elements 成分 ofanInstruction Operationcode Opcode 操作码DothisSourceOperandreference源操作数的信息TothisResultOperandreference目标操作数的信息PuttheanswerhereNextInstructionReference下一条指令的信息Whenyouhavedonethat dothis Page330 WherehavealltheOperandsgone Mainmemory orvirtualmemoryorcache CPUregisterI Odevice Page331 4 SimpleInstructionFormat Page332 EnglishwordSymbolicSymbolice g aninstruction 513 514 XXYAddX Y AssemblyInstruction 1 InstructionTypes opcode Dataprocessing ArithmeticandlogicinstructionsDatastorage mainmemory MemoryinstructionsDatamovement I O I OinstructionsProgramflowcontrol Testandbranchinstructions Page333 2 NumberofAddresses a 4addresses Operand1 Operand2 Result Address nextinstruction Beextremelyrare becauseofPC 3addressesOperand1 Operand2 Result A B C A BandCaresymbolicaddress Maybeaforth nextinstruction usuallyimplicit NotcommonNeedsverylongwordstoholdeverything e g Lengthofaddress 16bits Need16x3 48bitsforoperandaddress Page334 NumberofAddresses b 2addressesOneaddressdoublesasoperandandresulte g A A B ReduceslengthofinstructionRequiressomeextraworkTemporarystoragetoholdsomeresults NumberofAddresses c 1addressImplicitsecondaddressUsuallyaregister accumulator AC E g AC B AC Commononearlymachines NumberofAddresses d 0 zero addressesAlladdressesimplicitUsesastack堆栈 First In Last Out e g pushapushbaddpopc c a b Page334 T 1T T SeeP335Fig10 3 AccomplishY A B C DxE Exercisewith0 addressinstructions地址越少 指令越简单 但程序长 HowManyAddresses MoreaddressesMorecomplexinstructionsMoreregistersInter registeroperationsarequickerFewerinstructionsperprogramFeweraddressesLesscomplexinstructionsMoreinstructionsperprogramFasterfetch executionofinstructions Page335 10 2TypesofOperand Addresses地址 unsignedintegerNumbers数值数据Integer floatingpoint BCDCharacters字符ASCII Page199Table7 1 7 bit etc LogicalData逻辑数据Bitsorflags 0 true1 false Page337 10 4TypesofOperation DataTransferArithmeticLogicalConversionI OSystemControlOS专用TransferofControl Page341 1 DataTransfer 1 TransferdatafromonelocationtoanotherSpecify指定SourceDestinationAmountofdataMaybedifferentinstructionsfordifferentmovements不同移动可能需要不同指令Oroneinstructionanddifferentaddresses或一个指令 但地址不同 Page343 DataTransfer 2 Ifoneorbothoperandsareinmemory thenCPUmustperformsomeorallofthefollowingactions Calculatememoryaddressbyaddressingmode discussedinChapter11 Ifrefertovirtualaddress translatevirtualaddresstoactualaddressDeterminewhetheraddresseditemisincacheIfnot issueacommandtomemorymodule Page344 2 Arithmetic Add Subtract Multiply DivideSignedIntegerFloatingpoint MayincludeIncrement a Decrement a Absolute绝对值Negate a 求负 Page344 3 Logical Bitwiseoperations按位的操作AND NOT OR XOR 与 非 或 异或 InadditiontobitwiseoperationsLogicalshift逻辑移位Arithmeticshift算术移位Rotateshift旋转移位 Page345 ShiftandRotateOperations Page346 347 0 0 Sign 0 丢掉 丢掉 丢掉 Sign e g Shift3 bita 1010011000010100b 1010011000110000c 1010011011110100d 1010011010110000 Sign 4 Conversion E g1 BinarytoDecimalE g2 Convertingbetweendifferentbitlength Page347 5 Input Output Maybespecificinstructions e g In Out Maybedoneusingdatamovementinstructions memorymapped Page207Maybedonebyaseparatecontroller DMA Page348 6 SystemsControl Privilegedinstructions特权指令CPUneedstobeinspecificstateForoperatingsystemsuse Page348 7 TransferofControl 1 Branch转移 大跳 AlsocalledjumpinstructionBRcc 条件转移 andBR 无条件转移 e g BRZX branchtoXifresultiszero Page350Fig10 6 Page348 BranchInstruction Page350 BR 无条件跳转 BRcc 有条件跳转e g CF 进位OF 溢出ZF 结果为零SF 符号位 循环程序 分支程序 2 Skip小跳jumpovernextinstructione g ISZR1 IncrementandSkipifZero if R1 1 0

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论