## Display Device Driver Reference for OS/2

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

### Function F3H - Write Register Range

This function writes data to 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 the pointer/data chips.

Input

AH = F3h

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). Each entry contains the value to be written to the corresponding register.

Output

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

All other registers are restored.

Example

The following example writes the contents of cursloc into the CRT Controller Cursor Location High and Cursor Location Low registers.

    cursloc db   01h, 00h            ; cursor at page offset 0100h
            mov  ax, ds              ; assume cursloc in data segment
            mov  es, ax              ; es = data segment
            mov  bx, offset cursloc  ; es:bx = cursloc address
            mov  ah, 0f3h            ; f3 = write register range
            mov  cx, 0e02h           ; ch = start index of 14
                                     ; cl = 2 registers to write
            mov  dx, 0000h           ; dx = crt controller
            int  10h                 ; write them!