The system callback procedures are "hooks" into DOS (in the case of VDMs, into the DOS Emulation kernel) which allow application programs to change the default processing action taken for certain system events. These hooks are specified in the V86 mode interrupt vector table as trap service routines. By default, the vectors reference a single IRET instruction if an application does not register its own hook procedure.
The vectors used to specify the callback routines are:
INT 22h - Terminate Address
If it has not been changed, the normal OS/2 hard error monitor is called to display the hard error information and to prompt for a reply. If it has been changed, the specified critical error handler is invoked.
The OS/2 scheduler maintains a flag in the VDM address space which indicates if another process in the system is ready to run. While in the idle loop, the DOS Emulation kernel repeatedly examines this flag. If no other OS/2 tasks are ready, the loop proceeds as normal. If the flag indicates that other tasks are waiting, DOS Emulation yields control to the operating system, which dispatches the waiting task.
In all other respects, callback procedures operate under MVDM in an identical manner to that experienced under DOS 5.0.