## Display Device Driver Reference for OS/2

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

### Function F2H - Read Register Range

This function reads data from a specified range of registers on the EGA. A range of registers is defined to be several registers that have consecutive indexes, on a single chip. This function is applicable for pointer/data chips.

Input

AH = F2h

CH = Starting pointer value

CL = Number of registers (must be >1)

DX = Port number:

Pointer/data chips

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

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

ES:BX = Points to table of one-byte entries (length = value in CL). On return, each entry is set to the contents of the corresponding register.

Output

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

All other registers are restored.

Example

The following example saves the contents of the Attribute Controller Palette registers in paltable:

    paltable db  16 dup (?)
             mov  ax, ds               ; assume paltable in data segment
             mov  es, ax               ; es = data segment
             mov  bx, offset paltable  ; es:bx = paltable address
             mov  ah, 0f2h             ; f2 = read register range
             mov  cx, 0010h            ; ch = start index of 0
                                       ; cl = 16 registers to read
             mov  dx, 0018h            ; dx = attribute controller
             int  10h                  ; read them!