home *** CD-ROM | disk | FTP | other *** search
- Procedure GetRGBPalette( I : Word; Var R, G, B : Integer );
- { This procedure is a companion to the SetRGBPalette procedure }
- { within the BGI. It calls BIOS interrupt 10H function 10H }
- { subfunction 15H to get the Red, Green, and Blue values }
- { within the specified DAC register. }
-
- Var
- Regs : Registers; { Variable used for INTR procedure }
-
- Begin
- Regs.AH := $10; { Select BIOS function 10H }
- Regs.AL := $15; { Select SubFunction 15H }
- Regs.BX := I; { Select the DAC to query }
- Intr( $10, Regs ); { Call the BIOS interrupt }
- R := Regs.DH; { Read the Red value into R }
- G := Regs.CH; { Read the Green value into G }
- B := Regs.CL; { Read the Blue value into B }
- End;