## Display Device Driver Reference for OS/2

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

### [UnLock]

This section contains the list of commands required to make the hardware available for the execution of the SetMode section, as well as for saving and restoring of the controller and video buffer. The list of commands should be inclusive of saving and restoring the registers modified in the process, with the exclusion of the unlock key register. The function can be made mode-sensitive by using the conditional statements that evaluate key mode PMI keyvariables. However, the function could be a superset of all required unlock commands, for as long as such a sequence is not counter- productive in any mode sets.

Here is a sample file for a 9GXE S3 card:

    inb(r0, 0x3d4);               //save index
    outb(0x3d4, 0x38);
    outb(0x3d5, 0x48);
    outb(0x3d4, 0x39);
    outb(0x3d5, 0xa0);
    outb(0x3d4, r0);              //restore index