IRETD/ RET/ RETF 有什么区别,今天GOOGLE了一下:

RET, and its exact synonym RETN, pop IP or EIP from the stack and transfer control to the new address. Optionally, if a numeric second operand is provided, they increment the stack pointer by a further imm16 bytes after popping the return address.

RETF executes a far return: after popping IP/EIP, it then pops CS, and then increments the stack pointer by the optional argument if present.

IRET returns from an interrupt (hardware or software) by means of popping IP (or EIP), CS and the flags off the stack and then continuing execution from the new CS:IP.

IRETW pops IP, CS and the flags as 2 bytes each, taking 6 bytes off the stack in total.

IRETD pops EIP as 4 bytes, pops a further 4 bytes of which the top two are discarded and the bottom two go into CS, and pops the flags as 4 bytes as well, taking 12 bytes off the stack.

IRET is a shorthand for either IRETW or IRETD, depending on the default BITS setting at the time.

知道原因后,就可以灵活运用了

*前面push个什么地址,后面就跳到什么地址去执行

了解一下IRETD/ RET/ RETF相关推荐

  1. RET RETF IRET IRETD 指令的不同

    文章目录 RET RETF (return far) IRET (interrupt return) IRETD 参考书籍 操作系统:32位,保护模式,非影子堆栈(Shadow-Stack) 填一下之 ...

  2. ret/retf/iret

    ret/retf/iret (2011-03-10 23:10:27) http://blog.sina.com.cn/s/blog_67146a750100ra3l.html 转载▼ 标签: ret ...

  3. 汇编语言(王爽 第三版) ret retf总结 以及检测点10.1

    关键导读: ret对应的代码以及结果: assume cs:codesgstack segmentdb 16 dup(0) stack endscodesg segmentmov ax,4c00hin ...

  4. [汇编语言]-第十章 ret,retf,call指令

    1- ret 相当于 pop IP;用栈中数据,修改IP内容.从而实现近转移. 执行后(IP)=0, CS:IP指向代码段的第一条指令. 1 assume cs:code 2 stack segmen ...

  5. 高特权级代码段转向低特权级代码段(利用 ret(retf) 指令实现 jmp from ring0 to ring3)

    [0]写在前面 0.1)本代码旨在演示 从 ring0 转移到 ring3(即,从高特权级 转移到 低特权级) 0.2)本文 只对 与 门相关的 代码进行简要注释,言简意赅: 0.3)文末的个人总结是 ...

  6. Win-MASM64汇编语言-CALL/RET/RETF指令

    CALL和RET都是转移指令,它们都会修改IP,或者同时修改CS和IP,两个指令配合使用用来实现子程序 一:RET与RETF RET 将栈中的数据,放到IP中,从而实现修改IP,达到近转移 RETF ...

  7. 汇编ret ,retf ,iret ,int指令详解

    ** ret指令 ** 执行过程 ret指令用栈中的数据,修改IP的值,从而实现近转移. CPU执行ret指令时,进行下面两步操作: (IP)=((SS)*16+(SP)) (SP)=(SP)+2; ...

  8. ret,retf,iret等的区别

    RET, and its exact synonym RETN, pop IP or EIP from the stack and transfer control to the new addres ...

  9. 《汇编语言》第10章 call和ret指令

    call和ret指令都是转移指令,经们都修改IP,或同时修改CS和IP.它们经常被共同用来实现子程序的设计.这一章,我们讲解call和ret指令的原理. 10.1 ret和retf ret指令用栈中的 ...

  10. (十)汇编语言——CALL和RET指令

    (十)汇编语言--CALL和RET指令 文章目录 (十)汇编语言--CALL和RET指令 CALL指令 功能 寄存器 内存 段间转移 返回指令 ret retf 实例 MUL指令 模块化程序设计 寄存 ...

最新文章

  1. 网络管理员比赛回顾04-DHCP
  2. [国家集训队]墨墨的等式
  3. Windows下配置环境变量和需不需要重启?
  4. java面向对象的特征二:继承性 —(14)
  5. AngularJs ngIf、ngSwitch、ngHide/ngShow
  6. mysql3.51 密码修改_mysql修改密码
  7. 10 岁研究计算机,电脑神童“不务正业”的技术路
  8. 【Linux】七种文件类型
  9. c# excel vsto 表格偏移Offset
  10. 学生信息管理系统(SSM+JSP)
  11. xcode13创建mac控制台应用程序
  12. 大数据挖掘步骤都包括哪些?
  13. <aop:aspectj-autoproxy />作用
  14. [转]熊绎:我看软件工程师的职业规划
  15. 28379D第四章的ROM Code and Peripheral Booting
  16. 最最最详细的C语言教程笔记零起步(10)进阶必备 同笔者一起学习
  17. open vas简介
  18. 【AJAX】入门AJAX
  19. Java期末考试试题及参考答案(07)
  20. 使用三层思想完成商品管理系统

热门文章

  1. 利用ADS进行低噪声放大器(LAN)的设计
  2. 飞语云通信SDK,助力社交、医疗、金融等
  3. %3A%2F%2F这样的叫什么码啊?
  4. 怎样将webp格式转换成jpg格式
  5. 获取距离某个坐标点最近的几个坐标(计算距离)
  6. jsp是什么药_JSP中主要包含哪几种指令标识?它们的作用及语法格式是什么?
  7. c语言中正数按位取反,js中怎么理解按位取反?
  8. 后记——再见南航829
  9. 独家|喜马拉雅:如何揪出App推广假量?
  10. Python图像处理1:导入图像