Address Transformations (Thunks)

This section tells you how to change from 16:16 to 0:32-bit mode, or vice versa.
There are two parts to thunking, the address transformation, and properly aligning the stack, if necessary. The stack alignment is usually done by a subroutine which detects the need to do this, and builds an 'extra' frame in the new mode, properly aligned by making a copy of the incoming parms, transforming the addresses as part of this process.

This works only because the specific implementation within OS/2 which was designed to use address tiling for LDT selectors.


[Back: Why Thunk?]
[Next: 16:16 to 0:32 Thunk]