网站大量收购独家精品文档,联系QQ:2885784924

第6章_程序控制指令.ppt

  1. 1、本文档共68页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
LOOPE/LOOPZ (loop while not equal) Format: LOOPNE/LOOPNZ LABEL Operation: LOOP decrements CX; The LOOPNE/LOOPNZ instruction jumps to LABEL if CX0 while an not-equal condition exists; It will exit the loop if the condition is equal or if the CX register decrements to 0. 6-3 PROCEDUES (过程)(P. 200) The procedure (subroutine) is a group of instructions that usually performs one task. A procedure is a reusable section of the software that is stored in once, but used as often as necessary. The CALL instruction links to the procedure, and the RET instruction returns from the procedure. The stack stores the return address (the address of the instruction following the CALL) whenever a procedure is called during the execution of a program. The CALL instruction pushes the return address on the stack. The RET instruction removes the return address from the stack to the program returns to the instruction following the CALL. Procedure Definition Format NAME PROC NEAR/FAR …… …… RET NAME ENDP 6-3-1 CALL (P. 201) Near CALL Far CALL CALLs with Register Operands CALLs with Indirect Memory Addresses Near CALL (近CALL)(P.201) Format CALL NAME Machine Language E8 Displacement High Displacement Low Operation SS:[SP-1], SS:[SP-2]=IP; SP←SP-2 IP←IP+Displacement Note: The procedure is near type. The near CALL is relative intrasegment call. AFFFF AFFFE AFFFD 10004 10003 10002 10001 10000 Memory CALL FF FIGURE 6-6 The effect of a near CALL on the stack and the instruction pointer 0F Near CALL 00 03 Stack (Procedure) 11002 11003 IP before CALL =0003H SP before CALL=0FFFFH SS before CALL=0A000H New SP =0FFFDH New SS =0A000H New IP=0003+0FFFH=1002H Far CALL (远CALL)(P.201) Format CALL NAME Machine Language New CS Low New CS High New IP High 9A New IP Low Operation SS:[SP-1], SS:[SP-2]=CS; SP←SP-2 SS:[SP-1], SS:[SP-2]=IP; SP←SP-2 CS←New CS; IP←New IP Note: The procedure is far type. The near CALL is direct intersegment addressing. AFFFF AFFFE AFFFD 10004 10003 10002 10001 10000 Memory

文档评论(0)

xiaohuer + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档