## Display Device Driver Reference for OS/2

[prev][next][parent][TOC]

### SaveRestore Hardware

This service is available for .PMI files that use the PMI language to define SetMode sections. function calls become a no-op.

The virtual video driver and desktop driver do perform their own Save and Restore of the state and are not dependent on the service. The PMI-enabled base video handler uses the Save and Restore State service and, in case of a partial restore, reissues the mode set and restores the important video attributes.

The SaveRestore Hardware service is based on the PMI sequence for the SetMode; all of the ports that are programmed by the SetMode section for the current mode will be saved and restored. When saving a mode, the VIDEOPMI interpreter parses the command list of the SetMode section.

BOUTB commands are converted into BINB commands. The VIDEOPMI executes the newly constructed section in order to capture register values and converts all of the commands back into their original SetMode format. The command list is then ready for a subsequent RestoreState call and is returned to the user.

This approach has some limitations, mainly for adapters that employ double and higher indirection levels in register addressing; for example, the WDc24.