## Display Device Driver Reference for OS/2

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

### [GetBank]

Specifies the name of the function to be called in order to get the current write bank. This assumes a device with an aperture smaller than the PageLength. The bank number is assumed to be returned in r0. It should be sensitive to the mode.

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

    [GetBank]
    inb(r1, 0x3d4);          //save index
    outb(0x3d4, 0x35);
    inb(r0, 0x3d5);
    r0   & = 0x0000000f;
    outb(0x3d4, 0x51);
    inb(r2, 0x3d5);
    r2   & = 0x00000004;
    r2   <<= 0x00000002;
    r0   |= r2  ;            //r0 contains the value
    outb(0x3d4, r1);         //restore index