## Display Device Driver Reference for OS/2

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

### Function F7H - Define Default Register Table

This function defines a table containing default values for any pointer/ data chip or single register. If default values are defined for a pointer/ data chip, they must be defined for all registers within that chip.

Input

AH = F7h

DX = Port number:

Pointer/data chips

0h: CRT Controller (3?4H)
8h: Sequencer (3C4H)
10h: Graphics Controller (3CEH)
18h: Attribute Controller (3C0H)

Single registers

20h: Miscellaneous Output register (3C2H)
28h: Feature Control register (3?AH)
30h: Graphics 1 Position register (3CCH)
38h: Graphics 2 Position register (3CAH)

? = B for monochrome modes, or D for color modes

ES:BX = Points to table of one-byte entries. Each entry contains the default value for the corresponding register. The table must contain entries for all registers.

Output

AX: Restored
BX: Not restored
DX: Not restored
ES: Restored

All other registers are restored.

Example

The following example defines default values for the Attribute Controller:

    attrdflt db  00h, 01h, 02h, 03h, 04h, 05h, 06h, 07h
             db  10h, 11h, 12h, 13h, 14h, 15h, 16h, 17h
             db  08h, 00h, 0fh, 00h
             mov  ax, ds              ; assume attrdflt in data segment
             mov  es, ax              ; es = data segment
             mov  bx, offset attrdflt ; es:bx = attrdflt address
             mov  ah, 0f7h            ; f7 = define default register table
             mov  dx, 0018h           ; dx = attribute controller
             int  10h                 ; do it!

The example below defines a default value for the Feature Control register:

    featdflt db  00h
             mov  ax, ds              ; assume featdflt in data segment
             mov  es, ax              ; es = data segment
             mov  bx, offset featdflt ; es:bx = featdflt address
             mov  ah, 0f7h            ; f7 = define default register table
             mov  dx, 0028h           ; dx = feature control register
             int  10h                 ; do it!