This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
Family API (FAPI) is a subset of Control Program API which can be used to write binary portable applications. Such applications can be run as on OS/2 as on DOS system without any modifications.
It is known 3 versions of original Family API 1.00, 1.10 and Mapper from MS-DOS 4.0.
Also exists side Family API implementation:
Versions up to 1.10 is a original OS/2 Family API. 1.20 and higher is a osFree extensions.
It is possible to write programs which will run on OS/2, DOS and Windows NT from one binary. Moreover, same source code can be used without any #ifdef and other preprocessor statements. Such portability achieved via Family API. Family API is OS/2 API emulation layer on top of DOS. OS/2 executable file is in NE (New Executable) file format. NE file consist of two parts:
Using Family API MZ part of file used to provide loading and dynamic linking mechanism to load and link NE. Also Family API file contains emulation library which translates OS/2 API calls to DOS interrupt calls. So, same file can be executed as in OS/2 as in DOS. Windows NT contains OS2 Subsystem (os2ss.exe) which provides OS/2 API layer on top of Windows NT kernel. So, Family API allows to support 3 OSes using one binary file.
For current time only 16-bit Family API supported.
Feature | DOS 16-bit Real Mode | DOS 16-bit Protected Mode 1) | OS/2 16-bit Protected Mode |
---|---|---|---|
Max memory | 640KB | 16MB 2) | 16MB |
Virtual memory | No | No | 1Gb |
Multitasking | No | No | Yes |
Multithreading | No | No | Yes |
Long filenames | Yes 3) | Yes 4) | Yes 5) |
Extended attributes | Yes 6) | Yes 7) | Yes 8) |
App EXE name change | Yes 9) | Yes 10) | Yes |
For implementation details refer to Implementation details section.
This text based on http://www.edm2.com/index.php/Family_API