CH6 Program control instructions(程序控制命令).ppt

CH6 Program control instructions(程序控制命令).ppt

ID:48031343

大小:683.00 KB

页数:24页

时间:2020-01-13

CH6 Program control instructions(程序控制命令).ppt_第1页
CH6 Program control instructions(程序控制命令).ppt_第2页
CH6 Program control instructions(程序控制命令).ppt_第3页
CH6 Program control instructions(程序控制命令).ppt_第4页
CH6 Program control instructions(程序控制命令).ppt_第5页
资源描述:

《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

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。