proc far and near. 的简单解释

There are two types of CALLS and JMPS in 16-bit assembly: near and far.

在16位汇编中有两种类型的CALLS和JMPS:near和far。

Near contains a 16-bit offset. For calls it will save the IP only.
Far contains a segment and a 16-bit offset. For calls it will save IP and CS.

Near包含一个16位的偏移量。对于通话,它将只保存IP。
Far包含一个段和一个16位偏移量。对于通话它将保存IP和CS。

Defining a proc as FAR tells the assembler that all Calls to that proc must give both a segment and a 16-bit offset. The upshot of this is that the FAR Call will save both IP and CS. There are two variants of RET: RETN and RETF. One will pull off IP and the other will pull of BOTH IP AND CS. Go figure which one, okay?

定义一个proc为FAR告诉汇编程序,该proc的所有调用都必须给出一个段和一个16位偏移量。这样做的结果是FAR呼叫将保存IP和CS。 RET有两种变体:RETN和RETF。一个将拉动IP,另一个将拉动IP和CS。去判断你的是哪一个,ok?

“Information has a tendency to be free. Which means someone will always tell you something you don’t want to know.”


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部