Applications Running Under OS/2 2.0

OS/2 2.0 supports four types of applications: full-screen, window, PM, and DOS/Windows.

OS/2 applications can be further classified as pure 16-bit, mixed 16-bit, pure 32-bit, and mixed 32-bit applications.

OS/2 2.0 provides different entry points for 16-bit and 32-bit functions, making it possible to mix 16- and 32-bit code within a single EXE module. It is also possible to call 32-bit functions from a 16-bit C program, and to call 16-bit APIs from a 32-bit C program. To support this, two different libraries–OS2286.LIB and OS2386.LIB– are provided and changes have been made to the include file architecture and to the compiler (such as adding new keywords to support calling 16-bit functions).

OS/2 2.0 maintains compatibility with previous versions of the operating system by supplying an interface between 16-bit and 32-bit code, called a thunking layer. The purpose of the thunking layer is to convert code and memory objects from 16-bit to 32-bit and back. A 32-bit thunk binds 32-bit code to 16-bit code. A 16-bit thunk binds 16-bit code to 32-bit code. This makes it possible for 16-bit and 32-bit modules to coexist. Memory is addressable from each model through a technique called tiling.