Table des matières

INT 0x10 - 0x10 - Write/Read Palette Register (EGA/VGA)

Request/Call:

reg value descr
AH 0x10
AL var. sub function

Sub Function

AL Descr
00 set individual palette register
01 set border color (overscan register)
02 set all palette registers and border
03 toggle intensity/blinking (EGA)
07 read palette register (PS/2)
08 read border color (overscan register, PS/2)
09 read palette registers and border (PS/2)
10 set DAC color register
12 set block of DAC color registers
13 set attribute controller color select state
15 read DAC color register (PS/2)
17 read block of DAC color registers
18 update video DAC mask register
19 read video DAC mask register
1A read color page state
1B sum color values to shades of gray

AL : 00 set individual palette register

BH color value
BL palette register

AL : 01 set border color (overscan register)

BH color value

AL : 02 set all palette registers and border

ES:DX pointer to 17 byte table representing 16 palette registers and border color register
BL 0 enable intensity
1 enable blinking

AL : 07 read palette register (PS/2)

BL palette register to read (0-15)

on return:

BH value of palette register

AL : 08 read border color (overscan register, PS/2)

on return:

BH value of border color (overscan register)
ES:DX pointer to 17 byte table representing 16 palette registers and border color register

on return:

ES:DX pointer to table provided as input

AL : 10 set DAC color register

BX color register to set
CH green value
CL blue value
DH red value

AL : 12 set block of DAC color registers

BX first color register to set
CX number of color registers to set
ES:DX pointer to table of color values to set

AL : 13 set attribute controller color select state

BL 0 set Mode Control register bit 7
BH = value for bit 7
BL 1 set color select register
BH = value for color select register

AL : 15 read DAC color register (PS/2)

BX color register to read

on return:

CH green value
CL blue value
DH red value

AL : 17 read block of DAC color registers

BX first color register to read
CX number of color registers to read
ES:DX pointer to buffer for color registers

on return:

ES:DX pointer to color table provided as input

AL : 18 update video DAC mask register

BL new mask

AL : 19 read video DAC mask register

on return:

BL value read from video DAC mask register

AL : 1A read color page state

BL bit 7 of Mode Control Register
BH bits 2 thru 3 of Color select register if BL = 0
bits 0 thru 3 of Color select register if BL = 1

on return:

BL current paging mode
CX current page

AL : 1B sum color values to shades of gray

BX first color register to sum
CX number of color registers to sum

Return

nothing

Notes & Comments

  • all characters are displayed, including CR, LF, and BS
  • replication count in CX may produce an unpredictable result in graphics modes if it is greater than the number of positions remaining in the current row

Back