home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST1013.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-31  |  862 b   |  19 lines

  1. Procedure GetRGBPalette( I : Word; Var R, G, B : Integer );
  2. { This procedure is a companion to the SetRGBPalette procedure }
  3. { within the BGI.  It calls BIOS interrupt 10H function 10H    }
  4. { subfunction 15H to get the Red, Green, and Blue values       }
  5. { within the specified DAC register.                           }
  6.  
  7. Var
  8.   Regs : Registers;         { Variable used for INTR procedure }
  9.  
  10. Begin
  11.   Regs.AH := $10;           { Select BIOS function 10H       }
  12.   Regs.AL := $15;           { Select SubFunction 15H         }
  13.   Regs.BX := I;             { Select the DAC to query        }
  14.   Intr( $10, Regs );        { Call the BIOS interrupt        }
  15.   R := Regs.DH;             { Read the Red value into R      }
  16.   G := Regs.CH;             { Read the Green value into G    }
  17.   B := Regs.CL;             { Read the Blue value into B     }
  18. End;
  19.