汇编:ret以及retf指令
生活随笔
收集整理的這篇文章主要介紹了
汇编:ret以及retf指令
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
執(zhí)行ret指令,相當(dāng)于執(zhí)行pop ip
執(zhí)行retf指令,相當(dāng)于執(zhí)行pop ip,pop cs
?
assume cs:code, ds:data, ss:stack; 設(shè)置數(shù)據(jù)段 data segmentdb 128 dup (0) data ends; 設(shè)置棧段 stack segment stackdb 128 dup (0) stack ends; 設(shè)置代碼段 code segmentstart: mov ax, stackmov ss, axmov sp, 128mov ax, datamov ds, axmov ax,666Hpush axmov ax, 888Hpush ax retf ; pop ip, pop csmov ax, 4C00Hint 21Hcode ends end start assume cs:code, ds:data, ss:stack; 設(shè)置數(shù)據(jù)段 data segmentdb 128 dup (0) data ends; 設(shè)置棧段 stack segment stackdb 128 dup (0) stack ends; 設(shè)置代碼段 code segmentstart: mov ax, stackmov ss, axmov sp, 128mov ax, datamov ds, axmov ax,666Hpush axret ; pop ipmov ax, 4C00Hint 21Hcode ends end start?
總結(jié)
以上是生活随笔為你收集整理的汇编:ret以及retf指令的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python五十一:动态导入模块,通过字
- 下一篇: Oracle: 数字前面自动补0几种方式