Скачать Установка/Сброс Бита Мерцания (TXT Mode)

20.05.1995
Скачать файл (1,10 Кб)

{> Cut here. FileName= SETBLIN.PAS }
Procedure SetBlink(On:Boolean);        
{Turn blinking off to get more colors}
{Enable text mode attribute blinking if On is True}
 
Const PortVal:array[0..4] of Byte=($0C,$08,$0D,$09,$09);
Var PortNum:Word; Index,PVal:Byte;
begin
  Case GrDriver of
  HercMono:begin PortNum:=$3B8; Index:=4; end;
       CGA:begin
             PortNum:=$3D8;
               Case LastMode of
                 0..3:Index:=LastMode;
                 else Exit;
               end;{Case}
           end;
     MCGA..VGA:begin
             Inline(
               $8A/$5E/<On/                                 {mov bl,[bp+<On]}
               $B8/$03/$10/                                 {mov ax,$1003}
               $CD/$10);                                    {int $10}
             Exit;
           end;
    else Exit;
  end;
  PVal:=PortVal[Index];
  if On then PVal:=PVal or $20;
  Port[PortNum]:=PVal;
end;