This is an old revision of the document!
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
OS/2 Video Subsystem (VIO in short) aimed to provide text-mode and graphics-mode (full screen sessions only) video output. Original VIO supports 43 functions which mostly improvement of Video BIOS INT 10H API. Functions are much richer comparing to Video BIOS. It is supports Logical Video Buffer, which allow to have output in background sessions, while screen no accesable. Temporary video session allow to build message notifications system to handle errors and exceptions. Most of functions (41 function) can be replaced by user-defined functions by Alternate Video System. Alternate Video System can hanlde function and then return to caller or pass control lower, to Base Video System. You can register not all but some Alternate Video Subsystem functions, and user Base Video Subsystem for othe functions. Some VIO functions supported in Dual-mode applications by Family API. Under DOS functions simplier but powerfull yes. Many command line tools are Dual Mode applications, as well as many MS-DOS base Microsoft products also dual-mode applications. VIO also provide limited set of graphic mode support. VIO originalli is 16-bit and implemented starting from fist version of OS/2.
Video Subsystem
Application | ||||||
VIOCALLS | ||||||
VIO router | ||||||
Alternate Video Subsystem | ||||||
VIO router | ||||||
Base Video Subsystem | ||||||
OS/2 Video subsystem placed in VIOCALLS.DLL. Called VIO function passes control to internal VIO router function which, depends on registered functions replacement, routes call to Base Video Subsystem (BVSCALLS.DLL) or to registered Alternate Video Subsystem.
Such route in original OS/2 1.x serie. OS/2 1.2 includes additional functionality. Base Video Subsystem now uses Base Video Handlers ro access hardvare. Also Global Video Sybsystem hook was added. Base Vide Handler is a sort of video hardware abstraction layer. Global Video Subsystem allow to add notification hooks after VioRoute call.
Application | ||||||
VIOCALLS | ||||||
VIO router | ||||||
Alternate Video Subsystem | ||||||
VIO router | ||||||
Base Video Subsystem | ||||||
Base Video Handlers | ||||||
VIO router | ||||||
Global Video Subsystem | ||||||
In late OS/2 versions (3.x?) actual code of Video subsystem and Base Video Subsysten was moved to DOSCALLS.DLL (see Fig). OS/2 Video Subsystem is 16-bit. Later three independed versions of 32-to-16 bit wrapper subsystems was developed (See Fig)
16/32-bit Application | 32-bit Application | 32-bit Application | 32-bit Application | |||||||||||||||||||||||||||
EMXWRAP | OS2CHAR2 | CON3216 | ||||||||||||||||||||||||||||
VIOCALLS | ||||||||||||||||||||||||||||||
DOSCALLS | ||||||||||||||||||||||||||||||
VIO router | Alternate Video Subsystem/Global Video Subsystem | |||||||||||||||||||||||||||||
Base Video Subsystem | ||||||||||||||||||||||||||||||
DOSCALLS | ||||||||||||||||||||||||||||||
Base Video Handlers | ||||||||||||||||||||||||||||||
Under DOS original IBM Family API or JdeBP's Family API applications uses following call route
Application | ||||||
API.LIB | ||||||
Under HX DOS Extender OS/2 Emulation Family API applications uses following route
Application | ||||||
VIOCALLS | ||||||
Under DOS osFree Family API supports following route
Application | ||||||||||||||||
VIOCALLS | ||||||||||||||||
VIO router | Alternate Video Subsystem | |||||||||||||||
Base Video Subsystem | ||||||||||||||||
osFree attempts to combine all aproaches and provide following callflow
16/32-bit Application | 32-bit Application | 32-bit Application | 32-bit Application | |||||||||||||||||||||||||||
VIOCALLS | CON3216 | OS2CHAR2 | ||||||||||||||||||||||||||||
DOSCALLS | EMXWRAP | |||||||||||||||||||||||||||||
SUB32 | ||||||||||||||||||||||||||||||
VIO router | ||||||||||||||||||||||||||||||
Alternate Video Subsystem | ||||||||||||||||||||||||||||||
VIO router | ||||||||||||||||||||||||||||||
Global Video Subsystem | ||||||||||||||||||||||||||||||
Base Video Subsystem | ||||||||||||||||||||||||||||||
DOSCALLS | ||||||||||||||||||||||||||||||
Base Video Handlers | ||||||||||||||||||||||||||||||