微机原理与接口技术微机原理chapter21 6 instruction jmp.pptx

微机原理与接口技术微机原理chapter21 6 instruction jmp.pptx

  1. 1、本文档共47页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
/imgres?imgurl=/uploads/userup/0805/160J1515134.jpg&imgrefurl=/photo/ai/Flower2032.html&usg=__DNowrLY8sQGsbnJBq6y-WtZNihM=&h=550&w=550&sz=145&hl=ja&start=88&sig2=of1_m7VqM_u7HgbbZnFMMg&um=1&tbnid=a53krjEHxZt6rM:&tbnh=133&tbnw=133&ei=7hI-SdTCDaaeswLAydTtCw&prev=/images?q=%E8%8A%B1%E6%9C%B5&start=72&ndsp=18&um=1&hl=ja&rls=RNWN,RNWN:2006-45,RNWN:ja&sa=N 微机原理与接口技术Theory and Interface Technology of Microcomputer北京化工大学信息科学与技术学院主讲教师: 郭青guoqing@Chapter 2 INSTRUCTION SET2.6 Program Control Instructions控制转移指令The program control instructions direct the flow of a program and allow the flow to change.Program Control instructions include Jump 转移指令 Loop 循环控制指令 Call过程调用指令 Return 过程返回指令 Interrupt 中断指令2.6.1 The Jump Group转移指令Unconditional Jump (JMP) 无条件转移JMP allows the programmer to skip sections of a program and branch to any part of the memory for the next instruction. Short jump Near jump Far jump Indirect jumpShort Jump 1) Short Jump 段内直接短转移JMP Short_label; (IP) ← (IP) + 8-bits disp Relative jump. 相对转移Instead of a jump address, a distance, or displacement, follows the opcode. 1 byte disp — range -128 ~ +127A label is a symbolic name for a memory address指令给出一个语句标号,但机器指令操作数不是地址,而是此标号相对于当前IP的偏移量,用8位补码表示。∴ 转移范围 相对于当前IP -128 ~ +127Short JumpExample: XOR BX, BXSTART: MOV AX, 1 ADD AX, BX JMPSHORT NEXT ┋NEXT: MOV BX, AX JMP START 标号先引用,后定义,加SHORT限定0002H001EHB10021DISP10022—10023—100240020HOpcodeAssume:(CS) = 1000H标号先定义,后引用,不加SHORT,由汇编程序自动生成IP+127NEAR Jump 2) Near Jump 段内直接转移JMP near_label; (IP) ← (IP) + 16-bits disp Relative jump, similar to short jump2 bytes disp — range ±32KThe label is in the current code segment located within ±32K bytes from the near jump instruction.Three bytes instruction containing an opcode followed by a signed 16-bits displacement.类似于Short jump,指令给出一个语句标号,此标号地址相对于当前IP的偏移量为16位补码∴ 转移范围 同一代码段中 相对于当前IP -32768 ~ +32767Near JumpExample: XOR BX, BXSTART: MOV AX, 1 ADD AX, BX JMP NEXT ┋NEXT:

文档评论(0)

158****9376 + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档