How is a JUMP and CALL instruction different? How does it relate to the higher level concepts such as a GOTO or a procedure call? (Am I correct in the comparison?)

This is what I think:

JUMP or GOTO is a transfer of the control to another location and the control does not automatically return to the point from where it is called.

On the other hand, a CALL or procedure/function call returns to the point from where it is called. Due to this difference in their nature, languages typically make use of a stack and a stack frame is pushed to "remember" the location to come back for each procedure called. This behaviour applies to recursive procedures too. In case of tail recursion, there is however no need to "push" a stack frame for each call.

Your answers and comments will be much appreciated.

解决方案

You're mostly right, if you are talking about CALL/JMP in x86 assembly or something similar. The main difference is:

JMP performs a jump to a location, without doing anything else

CALL pushes the current instruction pointer on the stack (rather: one after the current instruction), and then JMPs to the location. With a RET you can get back to where you were.

Usually, CALL is just a convenience function implemented using JMP. You could do something like

movl $afterJmp, -(%esp)

jmp location

afterJmp:

instead of a CALL.

spring和jump区别,JUMP和CALL之间的区别相关推荐

  1. Spring Boot集成测试中@ContextConfiguration和@SpringApplicationConfiguration之间的区别

    即使同时使用@ContextConfiguration和@SpringApplicationConfiguration批注以及SpringJUnit4ClassRunner来指定如何加载Spring应 ...

  2. Spring MVC中@RequestParam和@PathVariable批注之间的区别?

    Spring MVC框架是在Java世界中开发Web应用程序最流行的框架之一,它还提供了一些有用的注释,可以从传入的请求中提取数据并将请求映射到控制器,例如@ RequestMapping,@ Req ...

  3. apt apt-get 区别_apt 和 aptget 之间的区别

    每个 Linux 用户都知道强大的 apt 和 apt-get 命令,并且很有可能使用它来管理系统中的软件包.但是,大多数人不了解 apt 和 apt-get 之间的区别,并且经常在使用一个或另一个时 ...

  4. python3各版本区别-Python各版本之间的区别

    Python各版本之间的区别 发布时间:2020-06-17 14:22:08 来源:亿速云 阅读:148 作者:鸽子 Python发展至今有哪些版本和各版本的区别是: 一.系统区别: 1.Downl ...

  5. ui和ux的区别_UX和UI之间的区别

    ui和ux的区别 Here you will learn about UX vs UI i.e. difference between UX and UI. 在这里,您将了解UX vs UI,即UX和 ...

  6. python版本之间的区别_Python各版本之间的区别

    Python各版本之间的区别 发布时间:2020-06-17 14:22:08 来源:亿速云 阅读:161 作者:鸽子 Python发展至今有哪些版本和各版本的区别是: 一.系统区别: 1.Downl ...

  7. 台式计算机和笔记本计算机区别,电脑与电脑之间的区别还能这么大,你都知道多少呢?...

    电脑与电脑之间的区别还能这么大,你都知道多少呢? 2020-12-11 10:59:01 0点赞 0收藏 0评论 控制方面,平板电脑通常是触摸屏类型,换句话说,我们也可以认为2是需要通过手指输入平板电 ...

  8. cookies和缓存的区别_Cookies和缓存之间的区别

    cookies和缓存的区别 Here you will learn about difference between cookies and cache i.e. cookies vs cache. ...

  9. spring和jump区别_jump和leap之间的区别

    jump,leap,skip,spring这几个词的一般含义是"跳": 1.jump 是个通用词,不问是从高处跳到低处,或从一点跳到另一点,都可使用 I can jump off ...

  10. Spring中Model、ModelMap及ModelAndView之间的区别

    1. Model(org.springframework.ui.Model) Model是一个接口,包含addAttribute方法,其实现类是ExtendedModelMap. ExtendedMo ...

最新文章

  1. 广州.NET 俱乐部第三次聚会成功举办。
  2. php如何实现读取网易有道词典输出单词的xml格式并且转化为html形式
  3. 【MM模块】 Goods Receipt 收货 2
  4. Jz2440 环境安装
  5. android线性布局快捷键,【整理】Android图形界面知识学习与总结之:Linear Layout线性布局...
  6. java lambda 两个冒号_java lambda 表达式中的双冒号的用法说明 ::
  7. junit.framework.AssertionFailedError: No tests found in错误解决办法
  8. 网站暴库原理与方法剖析
  9. android 恢复出厂设置不清除的分区,Android如何在恢复出厂设置时不删除掉/data/media/0/里面指定的目录...
  10. IE8-阿里icon字体引用不显示的问题
  11. 两个mysql 数据库表结构_MYSQL对比两个数据库表结构
  12. 物联网操作系统Zephyr(入门篇)之1.0 Zephyr简介
  13. 手披云雾开鸿蒙,赞美泰山的诗句
  14. The Devil is in the Details: Self-Supervised Attention for Vehicle Re-Identification(翻译)
  15. MU-MIMO和SU-MIMO分别表示什么?
  16. 汽车控制系统matlab,汽车控制系统建模与仿真(肖仁鑫)-中国大学mooc-题库零氪
  17. wine-linux下运行windows软件的神工具
  18. 使用joda_time计算两时间的月数差,天数差
  19. python 打开dat格式_p4vasp分析态密度输出pdos数据后用Python分列
  20. 学校计算机维护投标,计算机维护招投标技术文件.doc

热门文章

  1. Xp下的程序编译成linux,Windows XP下硬盘安装Linux系统
  2. gradle 失败 编译项目_maven常见问题处理(3-3)Gradle编译时下载依赖失败解决方法...
  3. mysql行锁还需要乐观锁吗_mysql行锁、表锁。乐观锁,悲观锁
  4. mysql哪个版本和x86兼容_[C++]C++连接MySQL,封装为class(兼容x86和x64)
  5. java中计算明年今天的日期_计算今天之后的下一个周年日
  6. c语言编译器查错,C语言编译器的错误信息
  7. 玩转 SpringBoot 2 之整合 JWT 上篇
  8. ndarray python 映射_191123 使用 Pybind11 和 OpenCV 创建 Python 库
  9. 基于JAVA+SpringMVC+Mybatis+MYSQL的网上商城
  10. Notes on how to use Webots, especially how to make a robot fly in the air