欢迎来到天天文库
浏览记录
ID:48031343
大小:683.00 KB
页数:24页
时间:2020-01-13
《CH6 Program control instructions(程序控制命令).ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter6Programcontrolinstructions6-1theJUMPgroup6-2ControllingtheFlowofanassemblylanguageprogram6-3procedures6-4introductiontointerrupts6-5machinecontrolandmiscellaneousinstructions6-1TheJUMPgroupUnconditionaljump(JMP)Shortjump1000:0100JMP01058-bitdisplacementDistanceforjump:-128~127
2、Nearjump1000:0100JMPNEAR0105jumpwithincurrentsegment16-bit/32-bitdisplacementfor8086/80386Distanceforjump:±32K/±2GFarjump1000:0100JMPFAR2000:0000Jumptoanylocationsegment:offsetaddresscontainedintheinstructions6-1TheJUMPgroupUnconditionaljumpJumpwithregisteroperandsJMPAXIndirectjumpJMP
3、[SI]JMP[BX+100H]6-1TheJUMPgroupConditionaljumpsandconditionalsetsAboveorbelowForcomparingunsignednumbersCarryistestedGreaterorlessForcomparingsignednumbersSignflagsistestedConditionaljumpAssemblylanguageConditionaltestedoperationJAZ=0andC=0JmpifaboveJAEC=0JumpifaboveoreuqalJBC=1Jumpif
4、belowJBEC=1orZ=1JumpifbeloworequalJCC=1JumpifcarrysetJEorLZZ=1JumpifequalorjumpifzeroJGZ=0andS=0JumpifgreaterthanJGES=0JumpifgreaterthanorequalJLS<>0JumpiflessthanJLES<>orZ=1JumpiflessthanorequalJNCC=0JumpifnocarryJNEorJNZZ=0JumpifnotequalorjumpifnotzeroJNOO=0JumpifnooverflowJNSS=0Jum
5、pifnosignJNPorJPOP=0JumpifnoparityorjumpifparityoddJOO=1JumpifoverflowJPorJPEP=1JumpifparitysetorjumpifparityevenJSS=1JumpissignissetJCXZCX=0JumpifCXiszeroJECXZECX=0JumpifECXiszeroExampleforconditionaljumpMOVAX,1234HMOVBX,1000HCMPAX,BXJGIF_GREATERMOVCX,1JMPNEXT_1IF_GREATER:MOVCX,0NEXT
6、_1:RETAX=1234HBX=1000HIfAX>BXCX=0ElseCX=16-1TheJUMPgroupLoopCXisdecrementedJumpstotheaddressindicatedifCX<>0Example:for(CX=10;CX>=0;CX--){}MOVCX,10;Label1:NOPLOOPLabel1NOPisexecutedby10times.LoopLoopLoopwLoopdConditionalloopLOOPEloopwhileequalLOOPNEloopwhilenotequal6-3ProceduresExampl
7、e6-16SUMSPROCNEARADDAX,BXADDAX,CXADDAX,DXRETSUMSENDPSUMS1PROCFARADDAX,BXADDAX,CXADDAX,DXRETSUMS1ENDP6-3ProceduresCallinstructionNearcallOperationPushtheoffsetfornextinstructionintothestackAddthedisplacementtoIPCallprocedureswithinthesegment(±32K)FarcallOperationPushthesegment&offsetad
8、dress
此文档下载收益归作者所有