OS/2 Version 2.0 provides a 32-bit programming interface, providing enhanced performance through use of the 80386 instruction set, and allowing applications to take full advantage of the 32-bit flat memory model. Since the application developer is no longer concerned with the details of manipulating segments, this simplifies the task of memory management within an application, particularly where large memory objects are used. The lack of a segmented memory model also facilitates porting of applications between OS/2 Version 2.0 and other 32-bit environments.
The 32-bit environment also provides performance improvements since applications have access to 32-bit processor instructions and 32-bit arithmetic. The flat memory model eliminates pointer arithmetic and segment register reloading, which further improves overall performance.
The lack of segmentation also makes program compilation much simpler, since the compiler (and hence the programmer) need no longer be concerned with calling sequences and far versus near memory references. Only when creating mixed model programs (see 16-Bit Application Compatibility) does segmentation become an issue.
Operations such as stack allocation for threads are also simplified in the 32-bit environment. Additional capabilities have been built into the operating system functions, removing the need for the application developer to explicitly perform these functions within the application code. This allows easier exploitation of the multithreading capabilities of OS/2 Version 2.0.
OS/2 Version 2.0 also provides application-transparent emulation of numeric coprocessor functions. If a coprocessor instruction is issued by an application in a machine with no coprocessor installed, the operating system traps the resulting exception condition and emulates the coprocessor instruction, returning the result to the application. Emulation is performed on a per-thread basis, thereby preventing interference between instructions from different threads or processes. All applications developed for Version 2.0 may therefore be compiled with in-line coprocessor instructions, removing the need for conditional testing or coprocessor emulation within the application itself.
Programming for the 32-bit environment is described in more detail in OS/2 Version 2.0 - Volume 4: Application Development.