The InitScreen function initializes the screen to text mode, and to the requested number of lines per screen.
AX
Specifies the number of lines for the screen. If the number of lines requested cannot be supported by the display device, the function rounds down to a number that the device can support.
DS
Specifies the segment address of the grabber (CS and DS registers are equal).
This function has no return value.
Windows calls this function just before a non-Windows application starts as well as before switching back to Windows. When switching back to Windows, InitScreen sets the display to a text mode that Windows supports. This ensures that Windows can correctly display the Windows screen.
Windows switches back to Windows when the non-Windows application terminates or when the user switches away. If the user switches away, Windows calls InitScreen after saving the application screen and calling the DisableSave function.