## Display Device Driver Reference for OS/2

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

### Function F0H - Read One Register

This function reads data from a specified register on the EGA.

Input

AH = F0h

BX = Pointer for:

Pointer/data chips

BH = 0

BL = Pointer

Single registers

BX ignored.

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

Output

AX: Restored
BH: Restored
BL: Data
DX: Restored

All other registers are restored.

Example

The following example saves the contents of the Sequencer Map Mask register in myvalue:

    myvalue db   ?
            mov  ah, 0f0h        ; f0 = read one register
            mov  bx, 0002h       ; bh = 0 / bl = map mask index
            mov  dx, 0008h       ; dx = sequencer
            int  10h             ; get it!
            mov  myvalue, bl     ; save it!

The example below saves the contents of the Miscellaneous Output register in myvalue:

    myvalue db   ?
            mov  ah, 0f0h        ; f0 = read one register
            mov  dx, 0020h       ; dx = miscellaneous output register
            int  10h             ; get it!
            mov  myvalue, bl     ; save it!