Calling a Procedure in the Current Task

This section describes how to transfer control to another procedure in the currently executing task. Table 8-2 on page 142 contains a list of the possible scenarios and the method to be used.

Table 8-2. How to Transfer Control to another Procedure in Current Task
To Jump to or CallUse
Procedure in the same code segment.The programmer uses a near jump or near CALL instruction.
Procedure in another, non-conforming code segment with the same privilege level (CPL = DPL).The programmer uses a far jump or far CALL instruction. A Call Gate (described in the next section) could be used, but isn't necessary.
Procedure in another, conforming code segment that has the same privilege level (CPL = DPL) or that is more privileged (CPL is numerically greater than the DPL).The programmer may use a far jump or far CALL instruction. A Call Gate could be used, but isn't necessary.
Procedure in another, non-conforming code segment that is more privileged.The programmer must use a far jump or a far CALL through a Call Gate. The Call Gate is described in the next section of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.189.177