Lecture4DataTransfer,Addressing,andArithmetic.ppt


文档分类:医学/心理学 | 页数:约48页 举报非法文档有奖
1/48
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/48
文档列表 文档介绍
Lecture4:DataTransfer,Addressing,andArithmeticAssemblyLanguageforIntel-puters,-relatedOperatorsandDirectivesIndirectAddressingJMPandLOOPInstructionsDataTransferInstructionsOperandTypesImmediateoperands(imm):ThedataisaconstantRegisteroperands(reg):Thedataitemisinaregister ---(mem):Thedataitemisinmemory----99fordetailsDataTransferInstructionsMOVInstructionCopiesdataGeneralformatMOVdestination,sourceFormats-legaloperands MOVreg,reg MOVreg,mem MOVmem,reg MOVreg,immed MOVmem,immedimmedmeansaconstantSourceanddestinationmusthavethesamesize"reg"canbeanyregisterexceptDoesnotchangeflagNote:MemorytomemorymovesarenotallowedDataTransferInstructionsMOVInstructionRulesIPSegmentregistersusespecialrules -tobeusedonlywhentheprogramrunsinrealmode -CScannotbeatargetoperand - bValdb20 wValdw0AAAAh dValDWORD0FEDCBA09h .code … movAL,10 movEAX,10 movBX,wVal movdVal,ECX;.386required movCX,bVal movDH,1234;illegal;illegalImmediateoperandsdonothavealengthattributeDataTransferInstructionsZero/SignExtensionofIntegersMOVZXInstructionMOVSXInstructionCopiesthecontentsofasourceoperandintoadestinationoperandandzero-extendsthevaluetoeither16or32bitsOnlyusedwithunsignedintegersCopiesthecontentsofasourceoperandintoadestinationoperandandsign-extendsthevaluetoeither16or32bitsOnlyusedwithsignedintegersDataTransferInstructionsZero/ bValdb20 wValSWORD8AAAh dValDWORD0FEDCBA09h .code … movAL,bVal movBX,wVal movzxECX,AL movSXEDX,wVal movSX,EAX,1234ECX=?EDX=?Anythingwrong?DataTransferInstructionsXCHGInstructionXCHGexchangesthecontentsofsourceanddestingationFormat xchgreg,reg xchgreg,mem xchgmem,regExamples:xchgAX,BX xchgAH,bData xchgwData,CXmov'srulesapply,doesnotchangeflagsDataTransferInstructionsLAHFandSAHFInstructionsLAHFSAHFCopiesthelowbyteoftheEFLAGSregisterintoAHExample

Lecture4DataTransfer,Addressing,andArithmetic 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数48
  • 收藏数0 收藏
  • 顶次数0
  • 上传人1387230****
  • 文件大小222 KB
  • 时间2020-08-10