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

  1. Procedure CreateGrayScale( FirstDAC,NumofDACs : Word );
  2. { This procedure will call BIOS Interrupt 10H Function 10H     }
  3. { subfunction 1BH to create a Gray Scale.  It will start with  }
  4. { the DAC specified by FirstDAC, for the number specified by   }
  5. { NumofDACs.  This is an alternate to using SetRGBPalette to   }
  6. { create a gray scale.                                         }
  7.  
  8. Var
  9.   Regs : Registers;           { Variable used by INTR          }
  10.  
  11. Begin
  12.   If( NumofDACs > 0 ) Then    { Check to see if input is valid }
  13.   Begin
  14.     Regs.AH := $10;           { Request Function 10H           }
  15.     Regs.AL := $1B;           { Request Subfunction 1BH        }
  16.     Regs.BX := FirstDAC;      { Beginnig DAC for gray scale    }
  17.     Regs.CX := NumofDACs;     { Number of DACs to include      }
  18.     Intr( $10, Regs );        { Create the Gray Scale          }
  19.   End;
  20. End;
  21.