PART 3 Advanced Topics

Chapter 17 Writing OS/2 Applications

Microsoft Operating System/2 (OS/2) takes full advantage of 80286 and later processors. It supports memory far beyond the DOS 640K limit and offers a rich set of multitasking system calls. Although OS/2 is much more powerful than DOS, you may ultimately find it easier to program for OS/2.

This chapter shows how to develop an OS/2 application and how to write dual-mode programs to run under both OS/2 and DOS.

To write OS/2 applications, you must learn OS/2 system calls. While this chapter mentions a few of these calls, you should consult the references listed in the book's introduction to learn more about OS/2 system functions.

OS/2 supports two modes—real mode, which emulates the DOS environment, and protected mode, which supports all the advanced features. For simplicity's sake, the rest of this chapter equates OS/2 with protected mode.

NOTE:

Examples in this chapter support OS/2 1.x. Future versions of OS/2 may support different calling conventions.