Interrupt 2Fh Function 1609h


mov     ax, 1609h   ; Windows Begin Exit
int     2fh         ; multiplex interrupt

Windows Begin Exit (Interrupt 2Fh Function 1609h) notifies MS-DOS device drivers and TSRs that Windows is about to terminate. Windows calls this function when it first begins termination to allow a device driver or TSR to prepare for a return to a non-Windows environment.

This function has no parameters.

Windows calls this function at the start of the Sys_VM_Terminate device control call. All virtual devices still exist, so a device driver or TSR can call a virtual device's entry point if necessary.

Windows does not call this function in the event of a fatal system crash.

Windows may execute real-mode code after this function has been called and before Windows returns to real mode. It is the responsibility of the device driver or TSR to detect and properly handle these situations.