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.
To Jump to or Call | Use |
---|---|
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. |
3.144.189.177