6.  ७ Turbo Pascal
-----------------------------------------------------------------
 ࠧ   ।祭  祭   ⢥
    모   ணࠬ஢    ᠭ  ਪ
ணࠬ.

     짮⥫,  㦭   ஡  ଠ  
Turbo Pascal,    設   ..,    
㪮⢠  ᫥   ⨬ 몠.    
  ᬮ७ ⮫쪮  .  筮,  
⥭         ।             몠
ணࠬ஢ 室,        ᮫
᫮  ⥭ .

      ।⠢ ⨭ ᪮쪨 ⪨ ணࠬ, 
   ᪮஢    믮    Turbo  Pascal  
Borland Software.

      訥 ணࠬ    
ணࠬ஢   VGA. ᮡ 뤥 ० 19, ⠪
   ᯮ짮 256 梥⮢   262144.    Turbo
Pascal ᨩ  4.0      ⢮ ᪨ ,
  ० 19    ।ᬮ७.

     ணࠬ஢  ந室   ᪠,  ⠪  
  設   ॡ.

     㫨, 㦠騥 ७ﬨ 몠 ᪠,  ⠪ ᠭ
 Turbo Pascal.    楤          
஥ ணࠬ⮬      ॡ.    ணࠬ
     祭    㣨  ணࠬ,      
ணࠬ஢       VGA    ᪠      
६  .

6.1  ᭮ ᪠
-----------------------------------------------------------------

      ࠡ   ਢ묨 ணࠬ ॡ Turbo Pascal
ᨩ 4.0  .       ணࠬ  ⠪
ॡ 襥 ࠪ᪮  몠 ᪠. , 
稭騥 ࠡ  ᪠ ணࠬ, ᪮॥ ᥣ, ᬮ
  ,   ᭮  ਬ஢.

        ணࠬ ⠪   ணࠬ஢
 Turbo Pascal ᨨ 3.0    Turbo BASIC.

     짮⥫,    ᮢ            
騥 ᪠,       ,   
ᬠਢ 祭  ணࠬ.

6.1.1  ॡ  ᯮ짮 ᪠
-----------------------------------------------------------------

     ⮡ 믮  ᫥騥 ணࠬ  ᯮ짮 ᥬ
२⢠ 㯠  256 梥⠬   262144,  ॡ  PC  
⮩ VGA, ࠢ쭮 祭   .

     ஬ ⮣,    ஫      ⥫
楤  ᪠.   楤      ᮧ  ᢮
ᮡ⢥ .         ⥬       
ᯮ짮    㣨  ⠭⭮ ᪠.

        ᮡ⢥          
⢥ ७ ⠭⭮ 몠  ᢮⢮, ਡ饥
᪠   ணࠬ஢ Forth.    몥  Forth  
ᮧ  ணࠬ ⠭  ᫮  ᠬ
몠 ணࠬ஢.

       ᠬ ࠢ  㫥 ᪠.   
㫨 ᪠,      ᢮ ᬮ७. 
 ⮣,    짮⥫  ᮧ ᢮ 㫨
᪠,   ணࠬ஢ 㤥 த ,
⢥ 騬 ॡ   PC.

6.1.2    ᪠
-----------------------------------------------------------------

      ᪠    ᬠਢ     楤 
몥 ᪠.  騩 ࠣ ணࠬ (  ।祭
 ⮣, ⮡   ॠ쭮   믮﫨)  㦨
 ⢥ 饣 ਬ ᯮ짮   ᪠:

Unit VGA                 { 砫  }
interface                {   }
uses dos,crt             { ᯮ짮 㣨 㫨 - dos  crt }
var Color : Integer;     { 騥 ६  }
      { ࢠ ப  楤  }
implementation           {  ⥫  }
Procedure MODE;          { ⥪ ணࠬ  楤 }
var Regs : Registers;    {  -''- }
begin                    {  -''- }
with Regs do             {  -''- }
 AL:=ModeHexNumber       {  -''- }
 AH:=$00;                {  -''- }
 end;                    {  -''- }
 Intr($10,Regs);         {  -''- }
 end;                    {  楤 }
                         {...⥫ 楤 }
end.                     {   }

      ⥫        稭         ᪠
"implementation". ⭮⥫쭮  ⮩    ᫥騥
 ४樨.

      ⮩    楤, ᫥ 
 .  ,  ᢮ ६  .
 稢 稥 ᫥  楤. ६
 ⮫쪮           ।  
楤ࠬ     "interface".        ⮬    ⫨稥    
ணࠬ஢   .

      砥,    ᯨ᮪  楤     
䠪᪨ ⮯ ࢮ ப  楤.  ப,
ᮤঠ  楤   ⥫ , 㦨 ⮫쪮 
 室  㫥.   ᯮ짮 楤    
ᥣ      ப 楤  ᯨ᪥ 楤
 .   ⨢ 砥  믮 ணࠬ
 㫥 㤥 筠  㣨 ᪠-ணࠬ.

     쪮  ६,   ।  㣫 ᪮ ᫥
 楤    ᯨ᪥ 楤,   ।
    ⥫ ணࠬ.    㤨 ஡,  ⠪
  ⮣    ਢ    訡  
। ६.

     ᫥⥫쭮,    ன  楤    
,   ⠪ ,     "implementation"
  ⥫.

      ࠡ  㫥,    묨 ᪠-ணࠬ, 
 ⮫쪮 ⠪  楤,    ࠭  뫠    
ணࠬ.  楤   ᯮ짮  楤 ⮫쪮
᫨  㦥 믮﫠 ணࠬ.   ⨢ 砥 
 ᯮ ,  ந 訡. ᮡ  㦭
  ᫥⥫쭮  楤  㫥.

                ⥪  ணࠬ    
᮫⭮ .   ⨢ 砥 ந 訡, 
 㤥  맢  ᫥  樨.       
࠭, ᪮  筮    ᪠      易
ᮢ. ⮬  ⥫   ᮣ襭    .
㪮 ᫥騬 ਬ஬:

     ᫨ ࢠ ப ணࠬ :       Unit Example;
     ணࠬ  ࠭ :         EXAMPLE.PAS
      ᫥ 樨  :         EXAMPLE.TPU

6.1.3   -०:  楤 ᪠
-----------------------------------------------------------------
      ⮣,  ⮡ ᫥ 㧪 ⥬  ᪠  ணࠬ
 Turbo  Pascal    ࠭  ०,     
।⢠ ࠢ 䨪.    ᤥ,  稢 
GRAPH.TPU   ணࠬ    uses.

     ᫨    ।⠥      짮  ⨬  ।⢮
(᪮   GRAPH      㯠    ०  19),  
ਤ ᠬ⥫쭮   ணࠬ஢   ॣ  ᪮
.

     ⥫쭮, 筮 㤥 ᮧ 㭨ᠫ  ,
     ᥬ 17 ०  VGA.

         㯭   ⥪ ணࠬ 
楤, ⠪  ࠧ,  ⮡      뫮  ந  
ᯮ짮 ।,         ᪨
.

     騩 ⨭ ᮤন ᪠-楤    
-०.   ᯮ  뢠  16  㯠  
ॣࠬ (AL,AH).
    
Procedure Mode(ModeHexNumber : Integer);
                          {   । ६ }
var Regs : Registers;     { । ७ ६ 楤 }
begin                     { 砫 ⥪ ணࠬ  楤 }
with Regs do              { ⮢ ॣ஢ AL, AH  뢠 }
 AL:=ModeHexNumber        { । 室 ६ -० }
 AH:=$00;                 { 㭪: ⠭ -० }
 end;                     {  横 }
 Intr($10,Regs);          { 맮 뢠  ⭠筮  $10= }
 end;                     { = 뢠    ० }

      楤 稭  । 室 ६
 ⮢ ॣ A.    -० ।
 AL,    ॣ A.    ॣ, ,
। ᫮ 0.  ᫮ ᮮ頥   室
 믮   뢠   맢   㭪      ⠭
-०.

     뢠 뢠,   믮饥   㭪   "⠭
-०"  ஬  -०  ⢥ 室
ࠬ. ᫨   ⭠   䨣    믮
襭  ०,   믮 ஬,
 १ ⮡ࠦ  ࠭.

6.1.4   -०: ⥪ ணࠬ
-----------------------------------------------------------------

       ᥡ 楤     ணࠬ.  
 楤        室      ⠢      
᪠-ணࠬ. ணࠬ   믮         
짮⥫    -०.

Program ChangeVideoMode;    { 砫   ணࠬ }
  uses dos,crt;             { ᯮ짮 㫨 dos, crt }
  var z : integer;          { ७ ६ ணࠬ }
   procedure VMode(ModeHexNumber:integer)
                            { 砫 楤, । ६ }
   var Regs : Registers;    {  ணࠬ }
   begin                    {  楤 }
      with Regs do begin    { }
      AL := Modehexnumber;  { -''- }
      AH := $00;            { }
    end;                    { -''- }
    Intr($10,Regs);         { }
   end;                     {  楤 }

begin                            { 砫  楤 }
 clrscr; directvideo:=false;     {  ࠭ }
 writeln('   -०:
 readln(z);     {    }
 VMode(z);      { 믮 楤 }
 write('  ⥬ 室  ०  ',z);
                { ⥪⮢ 뢮   ० }
 end.           {  ணࠬ }


6.1.5  ४祭  ० 19, ⭠  $13
-----------------------------------------------------------------

     ᪮쪮  ।⢠ ࠡ  梥⠬   VGA,  
⢮ ⮫쪮        ࠡ        ०    MCGA   19
(⭠  13).   ०  ᯮ  ࠧ襭
320*200 ᥫ  梥⭮ ᪮ ,   뫠
 ।⢥ VGA.  ⭮⥫쭮  ࠧ襭
⠢ 筮  ࠭      뢮  256  梥⮢,
롨ࠥ  饩   262144 梥⮢.

      ࠢ쭮 ணࠬ஢    ᮡ⢥
256 梥⮢, ⠪  梥⠬ ⠭⭮    ࠭祭.
 VGA ⠪           饣
᫠ 262144   梥⮢      ०   ࠡ,    
६   2  16 梥⮢.      ᯮ짮
⨬   ⥪⮢  ०,  ⮡    ⠭  梥,
ᯮ㥬 묨 ᪨ ⠬.

     騩 ⨭   祭  ணࠬ  "VMODE19"  
ࠧ "ਬ ணࠬ  DOS", ᪮  ᪮஢
 ⮦   饭   ப DOS.

Program VMode19;      { ப   ६ }
 var Regs: Registers; { । ७ ६ ணࠬ }
 begin                { 砫   ணࠬ }
   with Regs do begin { ⮢ ॣ஢ AL,AH  맮 뢠 }
   AL:=$13; AH:=$00;  {  -० 19 = -筮 $13 }
 end;                 {  横 }
 Intr($10,Regs);      { 맮 뢠  -筮  $10= }
end.                  { = 㭪   -० }

6.1.6  ᯮ짮   DOS
-----------------------------------------------------------------

     㯭 २⢮  ணࠬ஢     Turbo   Pascal
   ᮧ   ࠭ ஢ ᨨ
 ணࠬ.

     ஢ ணࠬ      䨪   ".EXE".    
䠪᪨ ணࠬ  設 몥,    뢠
  ப DOS  ᪠  ।  Turbo  Pascal.  ⮡
ᯮ짮 , 筮     ७
".EXE".

     ਬ஬   㦨  ⠪   ணࠬ,      VMODE19,
ᠭ    ᪮஢      ᪠.  ᫥  樨
ணࠬ ࠭  ᪥  VMODE19.EXE.  䠩 뢠
ᯮ塞 ணࠬ.   䨪   ".EXE"      ᮪饭  
"EXEcutable" ("ᯮ塞")      㪠뢠        
।⢥   ணࠬ  ᯮ.

      ᪠ ணࠬ   ப DOS 䠩 VMODE.EXE
㦭 ९    ४  DOS.         ঠ
⥫  DOS  ⤥쭮 ४ਨ.   ⮬ 砥
 㯠  ⮩  ४ਨ          䠩
AUNOEXEC.BAT.   ⮣     㯠  ⮩ 
४ਨ ᫥ 㪠   PATH 䠩 AUTOEXEC.BAT.

     믮 㪠 蠣,  ᬮ 뢠  VMODE19
  ப DOS,  ᫨   뫠 ⠭⭠ 
DOS - MODE.

6.2  㫨஢ 梥⠬
-----------------------------------------------------------------

     ࠢ⥫쭮    ࠭   ﬨ,     VGA  
ᯮ짮    梥⮢.      ࠧ    ᯮᮡ
㫨஢ 梥⠬  襣  ⥪,  ࠬ  .  ᥣ
  VGA  롨  262144 梥⮢.

6.2.1   ࠬ  ० 19
-----------------------------------------------------------------

     ⮡   ᨢ 梥⮢ 襭 ࠭,   
० ᥣ ᮧ ࠬ.  ࠭    ࠡ,
ந室饩   ࠭.        ᮣᮢ  
㣮.

      楤  믮    ,      
 㭪 BIOS  VGA १ 뢠 16.

     뢠  ॣ    ⠭ 
VGA,       ०.    ࠧ 
 ०   梥 ࠬ ࠭.

     騩 ⨭   ।⠢   ᮡ   ᪠-楤
FRAMECOLOR:
          
Procedure FRAMECOLOR(ColorNumber:Integer);
     { ⠭  梥 ࠬ }
var Regs:Registers;    { ॣ஢ ६ }
begin                  { 砫  ணࠬ }
 with Regs do begin    {  ॣ஢ ६: }
  AL:=$01;             { ⠭ ॣ ࠬ }
  AH:=$10;             { ⠭ ॣ  }
  BH:=ColorNumber;     {  梥 ࠬ }
  end;                 { ॣ஢ ६  }
 Intr($10,Regs);       { 맮 뢠   $10 }
end;                   {  楤 }

      楤  ⠪      ஥   ணࠬ 
. ,   楤   ᪠-ணࠬ    
 ணࠬ  ।ﬨ ६.  ᫨ 楤
頥  ,        ணࠬ
 ।ﬨ  ६    uses.    
 ணࠬ (稭    ᪠  begin)  㤥
룫拉 .

     ᯮ짮 "ᠬ"       ᪠   祬   
⫨砥  ᯮ짮 ⠭  ᪠.

     ᫥ ⮣,   楤 ᮧ,   ணࠬ  ᬮ
ᯮ짮 楤 FRAMECOLOR(...),  ।  祭 
0  255 ( ० 19)  롮   梥  ࠬ  ࠭.
   祭   ஢  ᨬ 
० ࠭  ᫠ 梥⮢  ᮮ⢥饩 .

6.2.2   ⥪  ० 19
-----------------------------------------------------------------

      㪮⢥  Heimsoeth/Borland  Software ᠭ ࠧ
ᯮᮡ ଠ஢  ⥪⮢  뢮    ࠡ    Turbo
Pascal.   :

     TEXTCOLOR(ColorNumber);

     

     TEXTBACKGROUND(ColorNumber);

         ४᭮   ࠡ     뢮  ⥪⮢  
設⢥ -०.   ᮦ,      ०
19 (⭠筮 13).   ꥤ   ,    
 ⥪   128 梥⮢,  ᫨ 梥   0  㤥  梥⮬
䮭.

     ᫨      ⠭    梥  䮭,    
ᤥ, 㫨 梥⮬  0.

      ਢ  楤  COLORTEXT,  ।祭  
⠭ 梥⮢ ⥪  ० 19:
              
Procedure COLORTEXT(Color:Integer);
 begin     { ⠭ ࠭ 祭   0  127 }
  if Color<0 then Color:=0;
     if Color>127 then Color:=127-Color;
     textbackground(Color div 16);
     textcolor(Color-((Color div 16)*16));
  end;     { 맮 ॣ஢  ⠭묨  }

6.2.3  ⮢   -० 19
-----------------------------------------------------------------

     㫨஢ ᠬ   ன   ᪮쪮   ᫮.   
 ।⠢,    ॣ    室  讬
:

      ,  १            㫨
(뢠 $10)   (ॣ , AH=$10).  殪쭮
⠦  (ॣ 梥, AL=$10) 室 256 ३ (
 , BX=),   㣨 . ᫨  
(   ),   㦨     .
     㡮 䮭,   ,    
(ॣ ⥭ᨢ 梥⮢ :  CL, CH  DH). 
  ४⥫ મ,  ॣ㫨騩  ⥭ᨢ
⠪ ࠧ,  ⮡ ᢥ饭      梥⮢
.

      襬       ᮮ⢥  ⠭  ஢
⥭ᨢ  㡮,    ᭮ 梥⮢  
ॣ CL,  CH  DH 祭ﬨ  0  63. 祭 0 砥
 ⢨  ,   63 -  ⥭ᨢ
.

     ᪮        梥⮢  ,    
   64 ࠧ  ஢,    ᥣ    
 64*64*64=262144 梥.

     , ࠡ      ᥬ   ⨬  梥⠬  ६
.  ० 19  ६  㯭      256
梥⮢.

        襩 ,   ⠭   256
梥⮢       256     ⠭  ⠬
 ᢥ饭.

     ਬ 梥⮢:   㡮 +  +  = 
                          63       63        63    = 
                          45       30        30    = -㡮
                          10       20         0    = -

      ᬮਬ 楤 PALETTE.   㦨    ⮣,
⮡        襣   ⠭ ⠬ 
梥⮢    ࠭ 梥 .
        
Procedure PALETTE(ColorNumber,Blue,Green,Red : byte);
  var
    Regs:Registers;
  begin
    with Regs do begin { ⮢ ॣ  뢠 }
      AL:=$10;         { ⠭ ॣ 梥 }
      AH:=$10;         { ⠭ ॣ  }
      BX:=ColorNumber; {    }
      CL:=Blue;        { 祭 ⥭ᨢ 㡮  }
      CH:=Green;       { 祭 ⥭ᨢ   }
      DH:=Red:         { 祭 ⥭ᨢ ᭮  }
    end;
    Intr($10,Regs);    { 맮 뢠 HEX 10 }
  end;
     
     祭 ⥭ᨢ  梥⮢  ।
  ६.



     㭪樨 BIOS,   ।祭      ⠭   ,
뢠 ।⢮  ॡ㥬 祭  ᮮ⢥
ॣ,   뫮   ।饬 ਬ.
     
      뢠,  ࠭          祭
梥⮢       梥    .  ᫥
।     祭   ࠭      㤥   ᮤঠ
⠭  梥.         梥    饩
 VGA.
     
6.2.4  饭 樨  ன
-----------------------------------------------------------------
     
     ᠭ     "PALETTE(,  㡮,  ,
)"   짮⥫     맮 ⠭ 
梥  256 梥⮢  ० VGA 19.
     
     ᫨         ⮩    ⠭  
 楫,    ਤ    祭  256 ࠧ,  
筮 ⮬⥫쭮.  ⥫쭮,      ,
       ࠧ   ⠭  ᪮쪮  梥⮢
.
     
     楤 BLEND   ।祭      ᮧ    
᫥⥫쭮    室    梥    梥  
࠭   ஢.             
⠭  ஬筮 梥 "".
     
     ⥭ ஬ 梥⮢    
⮬,   ந室  室    ᬥ襭     ५
᮪. ᯮ짮 楤 PALETTE   易⥫쭮:
     
 procedure Blend(Color1,Blue1,Green1,Red1,
                   Color2,Blue2,Green2,Red2);
  var Number,Bl,Gr,Re: Integer;
                              (* 梥   묨        *)
                              (*  室묨 ⥭  *)
  begin
    Number:= Color2 - Color1;
    for x :=0 to Number do begin  { ᮧ 室 ⥭ }
      if Number>0 then begin { Color2    Color1 }
        Bl:= (Blue1*(Number-x) + Blue2*(x)) div Number;
        Gr:= (Green1*(Number-x)+ Green2*(x))div Number;
        Rd:= (Red1*(Number-x)  + Red2*(x))  div Number;
      end;
      Palette(Color1+x,Bl,Gr,Re); { 맮 ⮩ 楤 易⥫ }
 end; end;
     
 
6.2.5  ᬮ 
-----------------------------------------------------------------
     
     ᯥਬ஢       PALETTE      BLEND,  
ᮧ ⥬ ᠬ - ᮡ⢥ .      
   㠫쭮    ᤥ   .
      믮   ᬮ   ,   ⮡
ᬮ,    㦭 ᤥ.
     
     ਬ, ᫨      ⥫  ᮧ    ⢥
梥⮢,   뫨 ,     ᫥      
᫨誮  筮 ન 梥⮢.  த 設⢮ 梥⮢
।⠢ ᮡ ⮭ 樨  梥⮢  
⮭   ᫠  ਬ  梥.  ᯮ  ⠪ 梥,   
ᮧ 㭪  ⢥묨 梥⠬.
     
     饭 ⮭  㦭  ᯮ짮  ᯥ樠쭮,  ᫨  
㦭 ᮢ ન 梥⮪,  ᢨ,  ⮬,
䨮⮢ ਪ  ..   ᠬ  뤥  騩  
।  䮭 ⢥, ਣ襭 梥⮢.
     
       ⥬⨧஢ ⮤ ᮧ ॠ
,     㯠  ப 
梥⮢  ࠧ ⥯ ⥭ᨢ.
     
          ᯮᮡ ⮨  ᮧ   
16 梥⠬ ᯥ.     16  梥⮢   
ࠧ   16  ஢  ⥭ᨢ.     
  16*16=256 梥⮢.
     
      ᮧ  ⠪ ᯮᮡ    
 ,      砥.   ⮣ 
楤 SHOWPALETTE,   뢮   256  梥⮢  ⥪饩
    ࠭.
     
Procedure SHOWPALETTE;         {   㤥 }
begin                          { 뢥  ࠭. }
  for Y:=0 to 199 do begin     {   X ᫥ 窨 255 }
    for X:=0 to 319 do begin   {  ७ 梥  }
      PokeY := Y*20            { 稭   0 }
      PokeX := X; Color ;= X;
      Meml[$A000+PokeY:Pokex]:=Color; { ᮢ 梥  ࠭ }
end; end; end;                 {  楤 }
                                                                  
      楤      ᮡ,   ॡ騥
᭥. -,   ᮤন   横,  
஡  ᥬ 320*200 ᥫ ࠭  ० 19.
     
      梥   ᫥⥫쭮  뢮  
ਧ⠫, ⠪      梥   ⨪쭮        
x-न ࠭ . Y-祭  㬭  20,
⮡ ᮮ⢥⢮   ॡ     ᪠  ⠭
. 祭       ࠭      ।⢮
।। ᨢ "MEML[...]".
                                      
      祭  楤  ணࠬ SHOWPALETTE 㤥
 뢮   ࠭    256  梥⮢  ⥪饩  
० 19.  ࠢ    ࠭,    x-न⠬  255,
   64 梥 .  ᫨     ᨫ  
    ,        SHOWPALETTE  뢥
⠭  VGA.  ⮬  ,   
       ।    ⠭  
梥.
     
     㣠 ஡   ⮨      ⮬,          梥
⢥ ન.      0  15 ᮮ⢥ ⠭⭮
   EGA.  쪮       16      31   ᮤঠ
⢥ ண    ⮭    ୮    .  
⠭⭮  㤭  冷    㣠  室
⥭. ਬ,   ᫨      㦭   ண   梥⮢  
ᢥ⫮-㡮  ᨭ-୮  ⮣,  ⮡ ᮢ  ,
  㤥 ᮧ ᢮ ᮡ⢥ .
     
          SHOWPALETTE  ⠭ 
VGA.   ᫥饬  ࠧ    ᬮਬ    ᮧ
ᮡ⢥  짮⥫.
     
6.2.6  , ࠨ 짮⥫
-----------------------------------------------------------------
     
      騩  ।,    稫  ⠭
 VGA          ᪮쪮  ᮡ⢥  梥⮢.
騩 蠣  㤥      ⮬,  ⮡  ᮧ  ,
楫       ᯥ樠쭮   ࠭   梥⮢.   
ࠨ 짮⥫  㦠 ᭮ ⥫
। ࠡ  -० 19 (⭠筮 13).
     
      㦥  뫮 ᪠ ,  訩 ᯮᮡ ᮧ 
⮨  ⮬,  ⮡  16  梥⮢     
   ᮧ  16  ஢ ⥭ᨢ.  ਬ,  宫
, ,  ⥯ ,  ࠭-,  ࠭,
-, , -, ᢥ⫮-, ,
-㡮, ᨭ,  㡮,  ᨭ-䨮⮢,      
୮-  訩 ਬ   16  梥⮢.
     
     室   ⨬  묨  梥⠬  믮  ⥬
 ⥭ᨢ          ⮭,   ᮧ
ࠫ ண.
     
     ਬ, મ-   梥      梥⮢묨   ⠬
㡮=0, =0  =63     ࠭ନ஢  
᭮ ⥭   梥        ⠬  㡮=37,
=42, =62.    梥      ᮧ      16
ࠧ묨 ஢ﬨ  ⥭ᨢ.  ਢ      15
㣨 묨 梥⠬,      256  ࠫ
⮭.
     
     楤 JANSPALETTE  ᯮ   BLEND  
 16  梥⮢  ᮧ ࠧ ஢ ⥭ᨢ, 
   ᢥ  ⥭,  १  梥,    ⥬
⥭.  ᮧ   256  梥⮢    筮  32
 BLEND.   0 । ⤥쭮.
     
6.2.7     ⥪⮢ ०
-----------------------------------------------------------------
     
      砥  VGA   饩    262144  梥⮢
 ࠭祭  ०  19.  ,        ᮧ
 PALETTE  BLEND, ⠪   ᯮ짮  㣨
-०,       ६  뢮   ࠭
ᥣ 2, 4, 8  16 梥⮢.
     
      ࠧ,   VGA  ⮫쪮  ᮢ⨬    ०
० IBM,    䠪᪨   , 
騩 롮 梥⮢.   VGA  뫨 㦤 ࠡ   
⥬   ஬  梥⮢    ⥪⮢  ᪨ ०.
       讥   ࠭祭   ⭮⥫쭮
ᯮ짮  梥⮢ VGA   ०.   㤥
७  梥⮢ 襩 .
     
     ਬ,     16 梥⮢  0 
60 襩      "EGA".     ⮬  砥    梥⮢  
ᮮ⢥    .     ࠡ 
 PALETTE  BLEND.
     
     楤 ASSIGNCOLOR  㦨    ⮣,  ⮡  ⠭
 梥 ࠢ  樨  .  ᫥ 믮  ⮩
楤 梥  1    뢠       1   
㫨஢  .     砥 PALETTE   FRAMECOLOR,  
楤 ⠪ ᯮ   ॣࠬ.
     
     ᯮ ॣ   뢠 $10.
     
 procedure ASSIGNCOLOR(ColorNumber, Color: integer);
                             (*    ⠭ *)
   var                       (* ࠢ묨 樨  .       *)
     Regs : registers;       (*  ᮡ      *)
   begin                     (*   ⥪⮢ ०.      *)
       with regs do begin    (* ⮢ ॣ஢  뢠*)
       AL := $00;            (* । ஢  浪       *)
       AH := $10;            (* ⠭, ᪮쪮 .   *)
       BL := ColorNumber;
       BH := Color;
   end;
     Intr($10,regs);         (* 맮 뢠 -筮 $10 *)
 end;
     
      ணࠬ,  VTEXTCOLOR,  ࠡ 
楤 BLEND,  PALETTE  ASSIGNCOLOR.  ᪮ ⨭  
楤 㦥 ਢ,   ⥪   ਢ:
     
Program VTEXTCOLOR; { 砫  ணࠬ }
uses dos,crt;       { 맮 㣨 㫥 }
var x:integer;      { ।/楤 }
 procedure AssignColor(....);   { ⥪ .  }
 procedure Palette(.7..);       { ⥪ .  }
 procedure Blend(..7.);         { ⥪ .  }
 procedure Mode(....);          { ⥪ .  }
begin                           { 砫  ணࠬ }
 Mode($3);                      { 祭 ⥪⮢ ० 3 }
  for x:=0 to 15 do AssignColor(x,x);  { ᢮ ஢ }
    Blend(0,10,35,50, 15,30,60,30);    {   VGA }
      for x:=0 to 15 do begin          { ணࠬ  横 뢮 }
        Textcolor(x);                  {  梥 ⥪⮢   }
        Writeln(' 梥 = ',x);   { ⥪⮢ ० }
      end;                             {  横 ணࠬ }
end.                                   {  樨 }
     
      ணࠬ    VGA  ⥪⮢ ०
3.    ,    VGA  ⠪  
 ⮭ 뫮  .
     
6.3  ᪨   19
-----------------------------------------------------------------
                         
      ᯮ짮  ஥ 짮⥫   Turbo
Pascal  ॡ ᪮쪮  .
     
     騥 ᪨   楤   ᯮ   ᯥ樠
᢮⢠ ०  19 (⭠筮 13).   ࠢ  ࠭
ᬮ७묨 楤ࠬ ᫥ 㯯     
䥪⨢ ᯮ짮  ० 19   256-梥⭮ ன.
     
      㣨   -०      ⠭  
᪠, 믮騥 ਬ୮   㭪樨.
     
6.3.1  ⥭  뢮  ࠭ ᥫ
-----------------------------------------------------------------
     
     楤 PLOT ਭ  室 梥.   室 
⮡ࠦ ᥫ ⮣ 梥  न x,y. 楤 PEEK
뢠   梥  ᥫ  न⠬ x,y  । 
祭  楫 ᫮.
     
Procedure PLOT(x,y: Integer; Color:integer);
  begin    { 뢮 梥⭮ ᥫ  -० 19 }
   if (x<320) and (x>-1) and (y<200) and (y>-1) then
    mem[$A000+y*20:x]:=Color
end;
     
Procedure PEEK(x,y: integer;var OldColor: integer);
begin    { ⥭  梥 ᥫ  ० 19 }
  OldColor:=GetPixel(x1,y1);
end;
     
      ᪠  mem[] ᯮ   権 
 . ᫨ ࠭  ⮩   짮,
 ᫥饥 ᭥:
     
     "Mem"     ᮪饭       ᫮   "Memory"   (),
⭮饣, ⢥,    襣  .  
"mem[..]:=祭" ⠢         
祭.  "祭:=mem[..]:" ⠢   
   祭.
     
      ࢮ  砥 "mem" ᯮ  ⮣,  ⮡ ਭ
祭  饭   .  ஬ "mem" ᯮ
 롮ન    । 祭  ६ ணࠬ.
     
     㬥   ᪮ ।⠢  ,
   믮  樨.  ਬ,  ᫨    
ᮢ 孨      㣮   ࠭      ०   19,  
ᮮ⢥騩 ⭠    㤥   ࠢ   $A0000.
 믮  ⥭      "mem[$A000:0]".  稥,
室饥  , ॡ ⥫쭮 ᭥.
     
      ।祭    ⮣,  ⮡    ᫮  
 ᮬ  ࠭  .  祭  ࠢ  
᪫뢠   ᮬ.  ஦ 㫨஢ 
 ᪫뢠  न  x  y   ᮬ ࠭ 
⮣, ⮡ ᮢ  .
     
      ࠢ     x-祭  㤥  ᫮  
 ᮬ.  ਬ,  窠    孥  ࠢ 㣫 㤥
  $A0000+(筮)319, ᪮  室  319
ᥫ ࠢ  窨  㣫.
     
     ⥬ Y-祭,          ᫥        ,
।⢥ ਡ   .  y-祭
㬭  320,  ..  ப ࠭ ᮤন 320 祪.
 ᫮  y-祭    ன   ⭠筮   ன
  ,  ᫥⥫쭮, 㬭   320   
16 (     ⭠筮  ᫮),      
४騩 樥 20.
     
     ⮡ ᬮ,      ࠡ⠥,  ᬮਬ ᫥
楤:
     
Procedure Plot(x,y: Integer; Color:integer);
  begin    { 뢮 梥⭮ ᥫ  -० 19 }
   if (x<320) and (x>-1) and (y<200) and (y>-1) then
    mem[$A000+y*20:x]:=Color
end;
              
     ⠫ ᪠  ᪮쪮  ᫮    ࠭祭  
PLOT.    ப   楤   PLOT   ࠭稢  
न 뢮 ᥫ  ० 19.  ࠭祭  
PEEK   .    PEEK   ᯮ짮  ⥭
 祪 㭪,   ᫨     ⥪騩  
࠭.
     
6.3.2  楤 BLOCK
-----------------------------------------------------------------
     
     ,   稫 짮 楤ࠬ  PLOT  
PEEK  㫨஢ ⤥묨 ᥫﬨ  ० 19,  
稭 ஡ ᮧ  ࠭ 㭪.
     
     த ᮧ  楤    ணࠬ    ᪠,
᭮   ᯮ짮  ࠭ 祭 ।.  ਬ,
楤 BLOCK  㦨     ᮢ      ࠭   梥⭮
אַ㣮쭨.   楤  ० 19 筠 ⠭⭮
 ᪠ BAR,  㯭  㣨 -०.
     
      ⨢  BAR,  楤 BLOCK  
 梥  256 梥⮢,  㯭   ० 19.  
PLOT,  楤 ᭮    ᯮ짮    ᪠
"mem[..]".
     
      楤   ஢     न    
 ⠬,  ᫨  न  ९⠭.    室  
 横, ᮧ न אַ㣮쭨. ⥬  
न ᥫ  ᥫ 믮 뢮  ᯮ짮
࠭ 梥 VGA:
     
Procedure BLOCK(x1,y1,x2,y2: integer; Color:integer);
var xcmyc,Keep: integer; {  梥⭮ אַ㣮쭨 }
begin    {  室  ⠬ न }
 if x2<x1 then begin Keep:=x1; x1:=x2; x2:=Keep; end;
 if y2<y1 then begin Keep:=y1; y1:=y2; y2:=Keep; end;
  for xc:=x to x2 do begin   {  横  }
   for yc:=y1 to y2 do begin { ᮧ אַ㣮쭨 }
    if (xc<320) and (xc>-1) and (yc<200) and (yc>-1) then
      mem[$A000+yc*20:xc]:=Color; {ᮢ 梥⭮ 窨 }
   end;  {  横  y }
  end;   {  横  x }
end;     {  楤  }
     
      ᭥:  横    x  ᮧ     ਧ⠫쭮
ப,   横   y   ப 㦭 ᫮ ࠧ  y1 
y2,  אַ㣮쭨  㤥 .
     
6.3.3  楤 CIRCLE
-----------------------------------------------------------------
     
      楤   (.      ᪥)  ᮧ  梥
㦭    ० 19,  ᭮뢠  ࠭ 祭
楤 "Mode" (⮡ ३  ० 19)  "Plot".   ⠪
砥,   楤      易    ᮡ   
ணࠬ.
     
     楤 CIRCLE  ਭ  x-   y- न 業ࠫ쭮
窨, 祭  ࠤᮢ    x    y,    ⠪     梥.
⥫ 祭    ࠤ   祭   ⠭
楤ன  0.  । 砫 横 ᮢ 祭 न
⠭ ⭮⥫쭮  ᮢ  㦭.   砥,
 ணࠬ     㦭   .
                                                              
     ணࠬ ᯮ 稪   ⭮⥫  न,
 ࠤ ६  稪  㭪樨 Circle.
     
      横 ணࠬ    ,   㤥
⨣ ,  ⭮⥫ y-न  ⠭ ࠢ묨
0.
     
     楤 ࠡ⠥ ⮫쪮  ⥫묨 㬥⠬.  
砥,   ⮫쪮 孨 ࠢ  ࠭,  ᫥
祣 ଠ    蠥   ।⢮   権      ⨬
⭮⥫묨 न⠬  PLOT.
     
     ᫥ ⮣,     ᮢ      窨  
 ࠭  㣠,    ⭮⥫ न
᫥饩 窨.  ᫥ ᭮  祭,  㥬
㭪樥 Circle.   稪   ࠢ 0, ந室
饭 ⭮⥫쭮 x-न  ४  稪.
     
     ᫨ 稪  Circle      0,   ந室   㬥襭
⭮⥫쭮 y-祭  ४ ᮮ⢥饣 稪.
     
      ᫮  ᯮᮡ  ᫥  ᥣ 
㦭   ஢,  ⠪    न  x-      y-   
  ᭮ 祭 㭪樨 Circle.
     
     楤 㤥  ࠡ  ⮫쪮  ணࠬ,   
뢠   Turbo  Pascal  VGA19  (.  )    ᮤন
楤 PLOT  MODE. -० । 맮 楤 CIRCLE
  ४祭  ० 19 맮  "MODE(19)".
     
     .3:  楤 Circle
     
楤 DISK
-----------------------------------------------------------------
                             
      ࠦ  ᪠  筮 ᮧ ࠦ
㦭. 饭 祪   ࠭ 믮 
- ᫮  ⥬᪨ ⮢ 頤 㣠.  窨
   ࠢ  ࠭  뢠    ᮡ    横
ணࠬ.
     
     뫮   筮    ᮢ  ਧ⠫  
⤥쭮 楤ன,    㤮    ணࠬ.
믮 ᪮,   ᫨   ந   ⠪  ணࠬ  
楤,   뢠 ⤥ 楤.
     
      ணࠬ      ᮢ    .  
ᮧ    ࠭          न  業,
ࠤ ⠢  x   y  梥.
     
       稥 楤   ᮢ  ᪨  ,
 楤  ࠡ⠥  ⮫쪮  ० 19.   ᪠ 
 ࠢ   256 梥⮢  ० 19, 祬 
       ।  ᠬ.  ,    ॡ
楤 PLOT,       室         
ணࠬ. (. ணࠬ  ᪥).
     
6.3.5  ᮢ   -० 19 (楤 LINE)
-----------------------------------------------------------------
     
       ࠭,  楤,  ।祭    ᮢ
,       楤    ᮢ  㦭⥩ 
᪮. ᪨  筠  ᫥.   ந室
᫥⢨ ⮣,      ᮧ            
࠭稢 ਧ⠫묨  ⨪묨  ﬨ    
室 १      ࠭  ࠭.   砩 㦥
ᬠਢ  楤 CIRCLE.
     
     ᪮      ࠧ  ,      
 믮  ⥫  ⥫ 饭  x
  y  ᮢ .    ᯮ짮 稪,
   ࠧ  祭 㤥    ,  
 㭪樨 circle.        x-    y-न  
ᮮ⢥⢨   .
     
      "LINE(...)"  ਭ      窨  
梥.   ࠧ    x-    y-न⠬.  ᫥
஢ન   ᪮筮  祭    砥 ⨪쭮
   祭  ᯮ         ᫥
  ࠢ .
     
     砫쭠 窠   ⠭ ன न.  
न ⠭  砫쭮  窮     ⭮⥫
न   ⠫쭮  .  न ⠫쭮 
    ᮮ⢥⢨    祭ﬨ,  㥬묨
㭪樥   (slope),    ,    㤥 ⨣
筠 窠. (. ਬ  ᪥).
     
     .4:    (LineDemonstration)
     
     
6.3.6   ࠬ
-----------------------------------------------------------------
     
      ࠬ 筮  ⠥    אַ㣮쭨,
᫥ 楤  室    ⮬  ᮢ襭 .
 楤   ᥩ   ࠭    ᯮ
  横.
     
      ᮧ ࠬ  ᯮ  .  
ᮥ   न 㣫 祪 ࠭. 楤
FRAME ⮦ ࠡ⠥ ⮫쪮  ० 19.     256
梥⮢ .   㯭 楤 LINE, PLOT  MODE.
     
Procedure FRAME(x1,y1,x2,y2,Color : integer);
begin
   line(x1,y1,x2,y1,Color);
   line(x2,y1,x2,y2,Color);
   line(x2,y2,x1,y2,Color);
   line(x1,y2,x1,y1,Color);
end;
     
     .5:   ࠬ (FrameDemonstration)
                                         
     
6.4  樠஢ ᪨ 
-----------------------------------------------------------------
     
     騥 ᪨        ᭮         ࠭
ᬮ७    䨪ﬨ.
     
     ⭮,   㥬  ᯮᮡ,    BLOCK,
LINE  DISK ᯮ 梥     ࠭.   
  訢  梥⮬ VGA.
     
     ᯮ짮 ⢥    梥   ᮧ   ⫥
"⢥" ᮧ   ஬   ⨭.   ।⢠
ᮧ 梥  ࠦ     ⮣
䥪.
     
      ᮧ   楤,  ᯮ騥  
梥⮢, 㯭      VGA,   訢 ᮧ
.
     
     ஢ 楤 ᮢ  㤥  뢠
FEATHER, 楤 ᮢ  - COLUMN,  ᪠ - BALL.
     
6.4.1  ।⥫ ॡ
-----------------------------------------------------------------
     
      ॡ । 砫      
梥⠬   ᮧ 室饩 .   ᯮ짮
஢  ,    뫠  ࣠  ᮮ⢥騬
ࠧ,     ࠭ 蠭 梥⮢.
     
      ᯮ   ᮤঠ   ࠧ   6.2.5     6.2.6
("ன  짮⥫").
     
      ᫥ 楤 ᮡ 㤮 ᯮ짮 ,
 ன   16  梥⮢,      ᢮
।   16 ஢ ⥭ᨢ.  楤  JANSPALETTE
㦨    ᮧ  ⠪  த  ࠨ  짮⥫
. ᫨  롥    梥      
஢    ,  ᮮ⢥騩  16  ஢  ⥭ᨢ
   梥⮢  ,    ଠ  㤥  
⢥ ணᨥ  梥⮢.      梥⠬  㤥
஡,  ᮢ⨬ 梥   冷   㣮.
     
     㣮 ᯮᮡ ⮨    ᯮ짮    BLEND  
८। ࠭      ஢     ⠪
ࠧ, ⮡      묨  ࠬ  뫠   ᮧ
⢥ ண ⥭.    ஢ 梥⮢ 
     ⥬      ᪨     
  .
     
     ,     ⠪    த   樨      
ࠦ, 㦥  室騥    ⮬        ࠭   
ᯮ騥  梥⮢,   ८।.
     
     筮 ,  १  ⮬  ।᪠㥬, ᫨
 ᮧ ⥬    ࠢ୮  騬
梥⠬.
     
6.4.2  ᮢ 梥  楤ன FEATHER
-----------------------------------------------------------------
                                                   
     楤 FEATHER (.   ᪥)      宦  
楤 LINE.    㤨⥫쭮,  ᪮    ᮧ  
࠭         .  ⮬       
楤   ᠭ 楤 LINE  ࠧ 6.3.5.
     
     ,   楤 ⢥ .    
   ⥮६ 䠣.
     
          ᬠਢ  ,    ᪫祭
⮣ ,    ।﫠        ࠭.
      ࠡ   
梥⠬.   易  ⥬,   蠡   梥⠬
ࠨ     ,        ᯮᮡ  
.
     
           ᮢ  ⪨        
 梥⮢   .        楤    
⥫쭠 ணࠬ  ᫥  .
     
          ᫮  ᯮ㥬    梥⮢
ᯮ  ᮧ  梥⮢  ⭮襭.      
窥 롨ࠥ    ᮮ⢥⢨    梥⮢ ⭮襭  
  ࠭  窨 .  ᫥ 梥 
㤥 ⨣  筮 窥 .
     
      ,  ᨬ   ,   ᮤঠ 
ண  梥⮢  梥⮢ .
     
      ६쭮 砥,      ⮨    
窨,  梥 㤥 ࠢ ᫥ 梥  .
     
6.4.3  饭 楤  (楤 HORIZONTAL)
-----------------------------------------------------------------
     
     ᪮ 楤   FEATHER    筮    ᫮,    
 맮     㣮  ணࠬ    楤  㤥
ਢ    讬   室   設   ६.   ⮬
⥫쭮     㣮   ᯮᮡ      ,   
横᪮ ७ 맮 FEATHER.
     
      㤥  ᯮ짮            
FEATHER, ।祭         אַ㣮쭨   
㦭⥩. ᪮            ॡ
ᮢ        ࠢ,  筮  楤,
饩 梥 ਧ⠫ .
     
      ࠡ  楤 HORIZONTAL. (.  ᪥).
     
6.4.4  梥 ᪨ (楤 BALL)
-----------------------------------------------------------------
     
     梥 , ᮧ   HORIZONTAL, 
ᯮ짮    㣨 .
     
     ᥬ 㦭   楤 DISK.     
ᮢ 㦭  ,  ᪮쪨 梥⠬.
     
      楤  ७    ਭ  ࠬ     
஬ 梥.          梥⮢  
⥪饩      楤  HORIZONTAL,  ᠭ  
।饬 ࠧ.
     
      믮 ⮩ 楤 祭  DISK.  孮
   ᮢ  .
     
     롮 梥⮢,  㯭    襩 ,
⢥   , ᪮쪮 "⢥" 㤥 룫拉
祭 ଠ.  ᫨     ᣫ ண 梥⮢
( ਠ樨 ⥭ᨢ  梥)      १
室 梥    ᮢ⨬    梥⠬,  
ଠ 㤥  -   룫拉    ந.
     
     楤 BALL ᯮ  ணࠬ Ball  Demonstration.
(.  ᪥).
     
     .6: ணࠬ BallDemonstration (Procedure BALL(...);)
     
6.4.5  梥 
-----------------------------------------------------------------
                                       
        ਬ   ਭ樯  楤  BLOCK.
० 祬    ᬮ  ᮢ 梥 ,   
ணࠬ ⮦ ॡ  .
     
     楤 COLUMN (.   ᪥)     横  
. ன 横 楤 BLOCK   HORIZONTAL.
     
     ணࠬ   ਭ ࠬ 砫쭮  筮
梥⮢  ᫥饩  ।  HORIZONTAL. 祭
 १  楤  ᬮ      ࠭ 
㪠묨 㣫묨 न⠬ 梥묨 ﬨ.
     
      ᭮,  ⮡   䥪    ,  
 ᣫ  梥.    ᯮ짮 ᫥⥫쭮
ਠ権   ⮣   梥  ଠ  㤥
  㣫 .
     
     .7: ணࠬ ColumnDemonstration
     
     
6.5  楤  ᬥ蠭묨 梥⠬ 
-----------------------------------------------------------------
     
      ।   ࠧ   뫨  ।⠢  楤,
ࠡ騥  梥⠬ .    롨  
ᬥ 梥⮢   ० 19.  騥 ࠧ 뢠,
     ᪨  楤        㣨
७ 㭪権  ᬥ襭 梥⮢ .
     
6.5.1  楤 Horizontal  ᬥ蠭묨 梥⠬ 
-----------------------------------------------------------------
     
     䥪 嬥୮,   ⨣   
 ᪮쪨  梥⠬,  ࣠祭,  祧   㢥祭
ࠧ஢ ꥪ.
     
     ᯮ짮 16 ஢ ⥭ᨢ   16  
梥⮢ ࠨ  짮⥫   ० 19 ⠭
 砥    ꥪ⮢  ⢥  ,    ᮧ
䥪 "".    䥪    ⥫쭮 ⥯
㬥   ᬥ訢 梥⮢ .
     
      ⮣  楤 HORIZONTAL    ࠬ
"Mix". 祭   ⮣  ࠬ  ।  ⥯  ᬥ襭
梥⮢.
     
     ᫨ Mix ࠢ 0,  ᬥ襭 梥⮢  ந室.  ⠭
Mix ࠢ  ᨬ쭮  祭  ਢ    ᬥ襭
梥⮢ ,      ⮬   䥪   嬥୮   ⠪
. ஦  ᯮ짮  ⮣  樥  (Mix=2)
ন 䥪 ᬥ襭   嬥୮ ࠦ.
     
      室   ⨭   BALLDEMONSTRATION,       ⨭
楤 MIXHORIZONTAL .  ᪥.
     
Program BallDemonstration;
 uses crt,dos,vga19;
 var xx,yy,a,b : integer; ch : char;
 begin
   Randomize;
   Mode($13); directvideo:=false;
   Janspalette;
   Block(0,0,320,80,194);
   FrameColor(100);
   ColorText(120); gotoxy(1,1);
   writeln(' 让    蠡: ');
   Ball(160,120,150,100,16*5,16*5+16);
   Zerokey; ch:=readkey;
   Blend(1,55,60,63,99,0,20,30);
   Listpalette; gotoxy(1,1);
   writeln( '楤 MIXBALL(...); : ᮪  ! ');
   writeln( '  ࠬ஬ MIX,  訬   ᣫ. ');
   MixBall(160,120,150,100,1,99,2);
   Zerokey; repeat
     xx:=Random(320); yy:=Random(200);
     z:=(random(15)+1)*16;
     b:=random(10)+10; a:=b+random(5);
     MixBall(xx,yy,a,b,1,99,Random(20));
   until keypressed;
end.
                   
     .8: 楤  MIXBALL,  ࠬ  Mix    
  ࠦ.
     
6.5.2  ७ 楤 BALL  COLUMN
-----------------------------------------------------------------
     
      ᪠   楤   MIXHORIZONTAL      
஥   㣨  楤.      ॡ  ⥫쭮
ணࠬ஢, ᪮ ᠬ MIXHORIZONTAL ।⠢ ᮡ
䨪 楤 HORIZONTAL.
     
      ⮣ 筮        HORIZONTAL  
MIXHORIZONTAL. ॡ ⠪ । ࠬ Mix. ஡
ᠭ    ணࠬ                ⠭.
⥫ ଠ .  ࠧ 6.4.3 - 6.4.5.
     
        ᪥  室  ⨭  楤  MIXBALL,
楤 MIXCOLUMN  ணࠬ MIXDEMO.
     
6.5.3  ⥫ ᯮᮡ ࠡ  梥묨 孮ﬨ
       (ணࠬ Quadratic)
-----------------------------------------------------------------
     
        ⥬,   ᬥ襭 梥⮢    ६饭
梥 ᥫ    楤  MIXCOLUMN    MIXBALL  
ᯮ짮   ᣫ  ꥪ⮢      祭   䥪
嬥୮ ࠦ.   ⠪ 㢨,  讥 祭
樥 ᬥ襭 Mix  ࠧ  䥪  ᣫ  
ਢ  ⮬,  ࠦ ꥪ 㤥 .
     
     樮 ணࠬ  ,        ᤥ
᫥   孮  ꥪ     㬥襭   ⠪
䥪 "ࢠ"   ࠦ.   (⨭   ணࠬ   .  
᪥).  ᫥饬 ਬ   ᣫ  梥⮢  㤥
ᬮ७  ஡.
     
     ணࠬ   梥  孮  (楤  BLOCK) 
梥 ⮫   ࠧ஢ (楤 COLUMN).   
᫥     ⮫  ⮣  ࠧ  ᣫ묨 梥⠬
(楤 MIXCOLUMN)      㡮  ᬥ蠭묨   梥⠬   (᭮
MIXCOLUMN).    ,    ⮫  ᣫ  (楤
MIXCOLUMN  ANTIALIA).
     
6.6   梥⮢: 楤 ANTIALIA
-----------------------------------------------------------------
     
         ࠧ      ᬮਬ     ,
।祭   ᣫ  梥⮢.      ᣫ
梥⮢   ᪮  몥  뢠 "anti-aliasing".  
ந諮  襩 ᫥饩 楤: ANTALIA.
     
     ANTALIA  ⮬᪨  ᣫ  梥  ꥪ,
    ,    ॠ
ࠦ.
     
      楤 ࠡ⠥ ⮫쪮   ०  19,  ᪮  
⢥ ०, 騩   䥪.
     
      楤     ⮫  ᫮,        ᭠砫
.  ᭮  ⮨  ⮬, ⮡ ࠧ 梥 
 㡮,         .  ⥬  
ࠢ  梥  㣨 梥⠬ .
     
        ᥫ    梥    ।⢥
㦥,     ਥ ᣫ騩 梥.
᪮ ⨬ 梥 ᣫ 筮  室  ⥪
, ந室 ᬮ ,      㤥 
訩  ⨬ 梥.   梥 㤥  ⥬  ᯮ짮
 饭 梥 㥬 ᥫ.
      梥⮢ ᨫ쭮   ,   룫廊 ꥪ.
 ४ ᯮᮡ  䥪 "",   
   砥    梥  ꥪ⮢.    ⮬
᭮,    ந室    ०    ࠧ襭
320*200 ᥫ ० 19.
        ࠧ襭 -   業,   室
   ࠡ  256 梥⠬.   ⨢  砥
ॡ   ᫨誮 让 ꥬ ࠭ . 
࠭祭 ࠧ襭   ࠭   ᨫ쭮           䥪
"" 梥⮢,    ண      
楤 ANTALIA.
     
     ANTALIA   㣨 ⮨⢠.  㡨ࠥ  ,
   ࠦ ꥪ, ᫨ 冷 뢠
   梥.  梥   ꥪ⠬      ਤ
梥 ࠬ,  室騥  ᭮ 梥 ꥪ.
     
        䥪  ᯥ⨢.    ⥩
࠭ ਤ ᯥ⨢  ,  䮪஢  .
   "㡨" ࠦ.
     
     ஬ ⮣,      ᮧ     ⥪⮢  ,
ᯮ  ⮣ ᣫ  㣫  .    
⥪⮢ ⮢   ⥪⮢  뢮    ०  19  諮  
믮   ⠭⭮  ⥪⮢  뢮  40    25
ᨬ.       㪫  ᨬ  ᨢ
梥⭮ 䨪 ਢ⥫쭮.
     
        ୥      ᮧ      ⥪⮢
⮢.   ।稬  ᣫ 梥⮢.
     
            ,    設⢮ ᪨
ணࠬ 㦥  ᯮ  ᣫ  梥.    ࠢ
㯭 ⮣   ।⢠     ⮢        ⢥
⤥쭮    ।  ணࠬ஢,  ⠪    Turbo
Pascal, 㤭   稬.
     
     ⮢ ணࠬ         ᮧ  
ਪ ணࠬ.      ࠧ   ।祭   
짮⥫,       ஫    ࠭  
 ।⢠, । 楤ன ᣫ, 㯭 
⢥ ⤥쭮   ᪠.   ᯮ㥬  楤
 ஥ 襩 ᮡ⢥  ⥪  ७  
Turbo Pascal.
     
      ᫥饬  ࠧ   ࠡ⠥   ,  
 ᮧ  楤  ᣫ  ANTALIA.      
ᮧ       ᮧ  ANTALIA  楤  㤥
믮 ᮡ⢥  㭨  㭪.    ᢮⢠   
஢ ⪨     ᪨     樮묨
ணࠬ.
     
6.6.1  뢠 
-----------------------------------------------------------------
     
     ,    ᯮ짮  ࠡ  ன VGA,
⠪   "PALETTE(...)",  "BLEND(...)"     "ASSIGNCOLOR(...)",
।祭   㫨஢  梥⠬  .   
㦭 ,     뢠 梥    ⥪饩
.
     
     ᠭ     SHOWPALETTE  뢮  ࠭
⥪   -०  19.         ७
権,      ⨬  ந    梥⠬,  ⮣
筮.
     
6.6.2  뢠    (楤 READPALETTE)
-----------------------------------------------------------------
     
     ⮡ 㧭,    梥  㯭    ⥪饩   
⥪騩 ,     ,   
    ⭮         ஠஢
ᮮ⢥騩  梥.   ⮣  㦥      ॣࠬ
.   ࠧ  6.2    㦥  ᠫ,    ந室 
.
     
       ࠧ  㯠      㦥    
⥭. ⮡    뢠 뢠 ,   ⨬ 맮
뢠  饭ﬨ    ॣࠬ  -  ᫥  㯠  
   । 㯮  ⥭.   ࠭,    
㭪 㤥    ᢮  .      ⥭   믮
।⢮ 맮 뢠.
     
      १  믮  㭪樨    祭 梥⮢
 㯭묨 楤  ⥭.  (⨭ ணࠬ  .
 ᪥).
     
6.6.3  뢠 梥  ।⢥  ࠭
-----------------------------------------------------------------
     
          ᮧ  ,       
    梥    ᥫ ࠭ 
० 19.      ⮣         ॣࠬ       
READPALETTE(...)        㯮    ࠭
   ⠭⭮  ᪠ mem[...].
     
      室    ⮩    楤     ॡ     न
㥬 ᥫ.    梥      ᥫ  
࠭ 믮,    뫮 ᠭ   PEEK.
     
     祭   梥          
READPALETTE,    뤥      ᭠,      㡠
.   祭 梥 ⥬ ।  楤 
⢥ १.
     
 procedure PeekPalette (var x,y,Blue,Green,Red : Integer);
 var                           (* 뢠 ⤥ 梥⮢   *)
   Color: Integer;             (* ࠭ ᥫ  ࠭             *)
  begin                        (* ᮮ⢥ Peek(...);ReadPalette(...);*)
   Blue:=0; Green:=0; Red:=0;          (* 樠 祭  *)
   if (x<320) and (x>=0) and (y<200) and (y>=0) then begin
                                       (* । ࠭ ࠭  *)
    Color:=Mem[$A000+y*20:x];          (* ᮮ⢥  Peek(x,y,Color);  *)
    ReadPalette(Color,Blue,Green,Red); (*   VGA19                  *)
                                      (* 饯 梥  3  *)
   end;
 end;
                                      
       楤   ⮩,  ४ᨢ 맮
⠭   ஦  .  ஡  易   맮
뢠   READPALETTE.
     
     
     
     
      맮     뢠     ॡ      ⥫쭮
୮ ६.  騥  맮    ਢ  
㦭 㧠    믮  ணࠬ.  ஬  ⮣,   
뢠 ࠧ뢠         ஬      ࠭.
⢥  ७        ࠦ  
ᯫ.
     
      ࠡ⪥  让    ࠭  䥪 ⠭
묨,   ᭨  ⢮  ⨭    ࠭.  ⮬
     ᯮ짮   ୠ⨢   楤,   
࠭ 室   맮 뢠.
     
        楫    ७ᨬ  맮   뢠      
ணࠬ,   맮  㤥  ந室   ᫨誮 .  
⮣  ⥪   VGA      ⠭    ⠡
६ .   ⮬ 㦭 ᫥ ࠢ ᪠ 
ࠡ  ஢묨 ६묨.
     
     ⥫ ଠ  ᮧ ୠ⨢  楤
PEEKPALETTE .  ᫥饬 ࠧ.
     
6.6.4.   ६ ᯨ᪮  梥⮢ 
-----------------------------------------------------------------
     
       ࠧ ᠭ,      祭  ⥪饩
 VGA    ६  ᯨ᪨.    ᠬ  ᬮ 
맮 뢠  뢠   梥 .
     
      ஢ ६ 㤥      
梥⮢ : 㡮,   ᭮    256
஢ 梥:
     
     var BL,GR,RE : Array [0...255] of Integer;
     
     ६  㤥  ஬      0  
255. BL[_梥]    -        㡠      梥,
GR[_梥] -    ,    RE[_梥]  -
᭠.
     
     ਬ, 梥⮢  梥  97 ⥪饩 
 ࠭  ⠡  BL[97], GR[97]  RE[97].
     
     祭   ᯨ᪠  뢠      VGA   
"READPALETTE(_梥)"     ।       ஢
६.
     
      ,   ᯨ᮪    直
ࠧ   ᥭ     .   ⨢ 砥 
ᯨ᮪ 㤥  ᮤঠ   ॢ訥   .   ᪨   
ॡ ।⠢     ᮡ     ⢥     ⮪
ᯮ짮 ᯨ᪠ .
     
     ,  ⮬  ᯮᮡ    २⢠.
஢ ६   ᯨ᪠         
믮     ⠬    梥  ,  祬
 뢠.
     
     楤 READPALETTE(...)"        ਢ  
ணࠬ, ᯮ㥬    ᮧ        ᯨ᪠
, 易⥫쭮.      ᯨ᮪  ஢
६   㦥  ⢮.     ।   
ந室   楤,  ⮡ 砥  १ ᯨ᮪
  㯥 㣨 楤ࠬ.
     
     騩 ⨭  ਢ  ⮫쪮      ਬ      
।祭    樨      祭      ॠ쭮
ணࠬ.

     Program MAKELIST;     {  ᯨ᮪ 梥⮢ ⥪饩  }
     uses crt,dos,vga19;
     var Bl,Gr,Re : Array [0...255] of Integer;
                           { ஢ ६ -  ⠡ }
                           { 㦭  LISTPALETTE ! }
     procedure ListPalette;{    ⠡  }
     begin                 { 祭ﬨ 㡮,  }
        for x:=0 to 255 do {  ᭮   梥 x }
          ReadPalette(x,Bl[x],Gr[x],Re[x]);
     end;
     
     begin {   - 筮,    ⥫쭮 }
     ListPalette;  {    , ਬ Mode(19) }
     end.
     
6.6.5  뢠 梥⮢  (楤 PEEKLIST)
-----------------------------------------------------------------
     
       ணࠬ ᬮ 뢠 梥⮢  ,
訢 ᯨ᮪  .    ⮬  ࠦ   ࠭ 
㤥    -    믮塞    맮    뢠.
᪠       ᮮ⢥騩   ᯨ᮪      
஢ ६  BL[..],  GR[..]     RE[..],   
ᮧ  砫 ணࠬ.
     
     ,    ᯨ᮪     ᥣ    
 LISTPALETTE ᫥  ,  ᥭ  ,
ਬ,  PALETTE  BLEND.
     
     㣠    襭  ஡  ⮨    ⮬,  
ᯮ짮    ᯨ᮪      祭  梥⮢
   窨  ࠭.    ⮣  㦭  ꥤ
楤 PEEK c ᮬ ⥪饣 ᯨ᪠ .    楤
祭 宦  PEEKPALETTE. (⨭ ணࠬ .  ᪥).
     
6.6.6    (楤 SIMILAR)
-----------------------------------------------------------------
     
            ᪠    ᯮ
    梥⠬.    楤      262144
 梥⮢ VGA   ࠢ      256  梥⠬  ⥪饩
.  ஬  ⮣, 楤 뢮    
    梥.
     
     騩 ᯨ᮪    譨  ⭮襭 
⮩ 楤,    ॡ  ᮫.  ᮪
 ।  ᯮ짮         
LISTPALETTE. (⨭ ணࠬ .  ᪥).
                                                   
var Bl,Gr,Re:Array [0...255] of Integer;  { ᯨ᮪  }
  {  ⠡ । ᯮ짮    }
  {    ListPalette }
     
     ᮪   (⠡)  ⠪     ப
। ६, ⠪ ⮡     祭ﬨ
 ⥪饩  .  室  楤   ६ 
 祭    ணࠬ    ⮣,         ᬮ
䠪᪨ ࠡ    ᫥ 楤.
     
      ।⠢  楤,  ᯮ㥬  ᮢ
  㦭⥩,  ࠧ.  楤 SIMILAR  ࠡ⠥  
室묨 ࠬࠬ    ⥬᪮ 㭪樥.   横
楤 믮   ࠬ஢     ,  
 㤥 믮 ஥ ᫮.
     
      横      ᪠    祭 
梥⮢    ,    㤥   梥,  
梥⮢  ண   । ⮣ .
     
      ᪮       ⮣,  ᪮쪮 ࠧ
㤥 믮 横.   ᫮ ⠪  ।  ⥯  ⮣,
᪮쪮  梥 ᮮ⢥ .  ᫨  ᫮
࠭    ।,      楤   REFERENCECOLOR   
ᯮ짮     ⢥  ࠬ  "RTG",    "३⨭"
⢠  ᮮ⢥⢨.
     
      ⮩   楤   易⥫   ॡ   
ᮧ ᯨ᪠  .  (⨭  ணࠬ  .   ᪥).
ਬ, ᫨  襫   梥,  祭    
᪮, ३⨭  (Rtg)  ᮮ⢥⢨ 㤥 ࠢ 1,   "祭
". ᫨ ⥪   ᮤন  宦  梥,  横
㤥 ७      ,    祭  RTG    ⨣
ᨬ㬠, ࠢ  6.   ࠬ   ३⨭   RTG      
ᯮ짮  㣨 ணࠬ  ਭ 襭  ⮬, ⮨
 ᯮ짮  梥,      ᪥.  樮
ணࠬ ॡ  VGA19.
     
6.6.7     (楤 ANTALIA)
-----------------------------------------------------------------
                    
     楤 ANTALIA  ࠡ⠥    אַ㣮  .   
ᮤন 楤   BLOCK     ⢥  ணࠬ.  稥
⮨  ⮬,           梥⮬.  ,
ᯮ㥬  訢 , ᣫ.
     
      ६   ࠡ   ⮩   楤      LISTPALETTE
ᯮ   ᯨ᪠    祭ﬨ  梥⮢
 梥⮢  ⥪饩   VGA.  楤 PEEKLIST ⠪
 室.   㦨    뢠  梥  
窨  । .
     
     㣠 㭪      窨,  㦠騥  
⤥ ᥫ,  ࠡ뢠 楤ன.    ⭮,
  窨 ।⢥ ࠢ,  ᫥,   
  ࠡ뢠 ᥫ.   梥⮢    
祪 ᪫뢠       ,    । 梥
祪  ⭮  ᥫ.
     
      । 梥  ᮧ    ।  祭  㡮,
   ᭮    㦠  祪.    設⢥
砥 ⠪  梥      .  ⥫쭮,  
     ⥪饩    襥  ਡ  ⮬
쭮 梥,  ⮡ 믮 㭪 ᣫ.  
ணࠬ 믮    楤ன    REFERENCECOLOR.   ⢮
ᮮ⢥⢨     梥⮬  ᣫ     訬
梥⮬       ।⢮  ࠬ "⨭".
訩 梥   㤥 ᯮ짮 ⮫쪮   ⮬  砥,
᫨ ३⨭      ࠢ  2.  ((⨭ ணࠬ .  
᪥).
     
6.7  ᫥⥫쭮 ᣫ  ᥫ
-----------------------------------------------------------------
     
      ⠪  ࠧࠡ  楤    ANTALIA,
 ᣫ    אַ㣮  ⥩.      㤥
㦨  ᣫ  ᥫ.   楤 
⥬ ᯮ짮    ஥    楤  ᣫ
ࠧ .
     
      ⮬,   楤 BLOCK 﫠   ANTALIA,
ணࠬ ᮢ  窨    ࠭  㤥   
 ᫥饩 楤 SMOOTH.
     
     楤 ANTALIA ᯮ짮   ᫥  ⨬쭮
梥 ᣫ  ⮫쪮    㦠騥  窨.   ⨢
砥      ᫨誮  ᨫ  䥪  "嫥",
 ᢥ    䠪᪮ ᣫ.
     
      ᫥⥫쭮  ᣫ  ᥫ  ᫥
梥 ᣫ ᬠਢ  㦠騥  窨,  
ᠬ ⥪ 窠.
     
        ⮨    ⮬,  ⮡ ᮧ ᠬ 楤
SMOOTH,  ⥬ ந   㣨,  ᯮ騥  楤.
       ७     ணࠬ    㣨
楤,  ⥪ ணࠬ         
.
     
     ᫥ ⨭  SMOOTH  ᫥  ᯮ    楤
SMOOTHCIRCLE.   ணࠬ  ॡ    VGA19,  ᮤঠ
ண ਢ   .
                                
     .9   ᫥⥫쭮 ᣫ  ᥫ
     
6.8  䨪樨 饩 
-----------------------------------------------------------------
     
      祭    䥪⮢      
   讥 ᫮ 梥⮢ 饩 . 
⮣        㯯 梥⮢,   
,       楫,          梥  
⤥쭮.
     
        ᯮᮡ 䨪樨 ⮨  ࠢ મ,
  ⥫.   梥  (  )  
⮬ 㢥稢  㬥 મ   稭.
     
     騥    楤   ।⠢  ࠧ  ᯮᮡ
㢥祭  㬥襭 મ     㫨஢
㡮,   ᭮ ⠬  梥.
     
6.8.1  ᮫⭮ ॣ㫨஢ મ 梥⮢ 
-----------------------------------------------------------------
     
      楤,  DIM,    ॣ㫨஢  મ
梥⮢ ,  ਡ  祭  ᭮,  
㡮 ⠬  ࠭  ஢  .   ⥫쭮
祭 㢥稢 મ,  ⥫쭮 㬥蠥.
     
      楤   ⠪   ᯮ  ᯨ᮪  梥⮢  ,
࠭    ⠡  ஢  ६.  
   ᭠砫  믮  ᯨ᪥  ⥬
ਡ  ᮮ⢥騥   祭.
     
     ᫥ ⮣,    祭     ᯨ᪥      ࠢ쭮
⪮४஢,   ।   VGA.  ন 
 ஢ ६ BL[..],  GR[..]  RE[..] ।
।⢮  PALETTE(...).
     
     ᪮       ।祭    ࠡ    
⤥묨 ࠬ  ,  ⠪            ஢,
믮  横   ࢮ  ᫥ ஢
塞 梥⮢  .  㣨   横,   ।騥   
祭 梥  ᯨ᪠   VGA, ᥣ ஡  0
 255.   ࠧ,  ᫥ 믮 DIM      ᯨ᮪
 ᥣ ᮢ.
     
     騩 ⨭      VGA19,   
 ਪ    uses       ᯮ饩   
᪠-ணࠬ.
     
6.8.2  ⭮⥫쭮 ॣ㫨஢ મ 梥⮢ 
-----------------------------------------------------------------
     
     楤,       ⮫쪮      ᬠਢ   
ॣ㫨஢ 梥⮢   ,    ⮪,  騩  
"뢠" 梥⮢  砥,  ᫨ ᤥ ᨫ . 
䥪 祭   "।প"      "প"     
⮠  ꥬ.
     
      ந室  ᫥騬  ࠧ:    ⪥   
᮫ 樥 મ    ⮣ મ 梥 㡠,
   ᭠    ⮣  梥      ⨣
ᨬ쭮 祭,  ࠢ  63.  ⮬  
梥.
     
       ᠬ ࠢ      ⥬  ⮭.    
梥⮢   ⨣  祭  0,  ⥬   ⥩
࠭ 룫 묨.  ᫨    䥪  ࠭  
᪮쪮 梥⮢  ,   ⮭ 梥⮢ ࠧ 
⥩ ࠭   .
     
      楤,  DIMPERCENT,  । 㣮  ᯮᮡ
ॣ㫨஢ મ  梥⮢  ࠭.      મ 
 業.          믮    ⭮⥫쭮
ॣ㫨஢  塞 梥⮢   ⥪騬 祭ﬨ
મ  ᨬ묨/묨.
     
      ᠬ ન  ⥬ ⮭       ⠪  
ᨫ쭮,     ।  ⮭,      ࠭  ⮭
梥⮢ ⥭.      ।饩  楤,  ⥫
祭 樥 મ   㢥祭,  ⥫
-  㬥襭 મ ࠦ.
     
6.8.3  ८ࠧ 梥⮢     ⮭
-----------------------------------------------------------------
     
         ।   楤       ᯮ짮
᢮⢠ 梥⭮  VGA.     
ࠡ ⮫쪮   祭ﬨ મ 梥⮢ .   ⮣
梥  ८ࠧ   ⮭.
     
     ணࠬ NEWPALETTE 㦨  ⮩ 楫,  ᯮ  맮
뢠   㯠    ᯥ樠 㭪 VGA ८ࠧ
梥⮢  誠  ⮭.   ⮣ 㡠,   ᭠
  梥 訢 ⤥쭮,  ᪮ 
  -ࠧ    મ 梥.
     
      誠   梥 롨ࠥ ᫥  饣
樥 મ   梥.  ண        ୮
 "梥⭠",  ⠪        㡮,    
᭮   ⠭    祭  ண ⮭ 
    祭.
     
     ࠪ᪮ ਬ ⮩ ணࠬ ⮨  ⮬,  ⮡
।⥫쭮 ᬠਢ   ᪨   ࠦ   ।
   ୮- ਭ.
     
     .  ᪥ ⨭ ணࠬ NEWPALETTE.    稬,
     ணࠬ  ,   ॡ 
VGA19.   ᪮஢  믮   Turbo  Pascal
(4.0  ..).
     
6.9  襭  ᪠
-----------------------------------------------------------------
     
     ⮡     ⥪  楤  直         
ᯮ짮    ணࠬ,  ᮧ    ᪠    ⨬
楤ࠬ,  뫮 ᪠  砫  .
     
     稢訩  㤥 㦨 ७ 몠 ᪠.
    ᯮ짮   ணࠬ  ᪠,  
  ⠭ 㫥,  ⠪    GRAPH.TPU,    祣
筮      uses.
     
      ᬮ७  楤,    ᮧ  襭
    ॡ㥬 ६,  ⮬ ᫥
ᯨ᮪ ,  騩   ஢ ६.  
 ।  ६    ணࠬ 
ਤ.
     
      ப        ணࠬ  㤥 뢠
 VGA19.TPU:
     
     Uses crt, dos, VGA19;
     
      ப       室        孥    樨
᪠-ணࠬ, ।   ।   ६.     
ᬮ ᯮ짮    襩  ணࠬ    :  MODE,
FRAMECOLOR, COLORTEXT,  PALETTE, BLEND, JANSPALETTE, SHOWPALETTE,
PLOT, PEEK,  BLOCK,  ASSIGNCOLOR,  CIRCLE,  DISK,  LINE, FEATHER,
BALL, COLUMN,   FRAME,   READPALETTE,  LISTPALETTE,  PEEKPALETTE,
SMOOTH, REFERENCECOLOR, PEEKLIST, ANTALIA, ATALAYA, SMOOTHCIRCLE,
DIM  DIMPERCENT.
     
      㫥 ⠪  室  㣨 楤, ZEROKEY,
MINITEXTXY, MINIPRINT      GLASSPRINT,         
ᯥ樠묨 ᪨ .
     
6.9.1     楤 ZEROKEY
-----------------------------------------------------------------
     
     楤 ZEROKEY   ᪮  VGA.  
        ᨫ.
     
      ணࠬ  ன 窥 ⠭ 믮,
 ०,  祬 த ࠡ,     짮⥫  ⨥
 .  ਬ,  ᫨  뫠  訡  
訢 ࠭,   ⨥    . 
窥,    ⥫쭠   ⠭,     ⮬  砥  㧠  
ந.  ᮡ ⭮  ६ ஫  ⥪  
ᯫ, ⠪     ⮬ 砥 㦭 ࠭  "᪮",
० 祬  ᯥ  .
     
     楤 ZEROREQ 蠥  ஡,    
 ।  ⥬,    ணࠬ    ᤥ .  
᪠-ணࠬ  ᬮ ᯮ짮  楤  ZEROKEY  
WAIT  ᪨ ०.  ᮮ⢥  ।
ᨩ  .

      楤,   P()   ।⠢    ᮡ    ਬ
२ ⠭⭮ 楤.   २㥬 ⠭
 ᪠   Writeln().      楤   ࠭   
㭪樮 ᢮⢠  ਣ.  ᫨    ,   
⠪ ࠧ  २     㣨      ᪠,
ਬ, ⮡ ᤥ   .
     
     Procedure P(str : string);
      begin Writeln(str);
     end;
     
     楤 WAIT(...)  ᯮ    ZEROKEY.  
頥   ZEROKEY  ,   ⥬  ⠢
  ᫥饥 ⨥ .   䥪, 
᫨   ࠭  ஫  ⥪     ஥      
ணࠬ.
     
     procedure Wait;    { 頥    }
                 begin  {      }
     ZeroKey;           {  楤 易⥫쭠 }
      repeat
      until keypressed;
     end;
     
        ᪠-  ⠪  祭     ⥫
楤       -⥪.  楤  MINIPRINT(VGA),
MINITEXT(VGA)    GLASPRINT(VGA).      ணࠬ    
ணࠬ, ।祭      ࠡ      -०  13
(⭠筮 0D).    ᤥ ᮮ⢥騥 ,
騥 ᯮ짮  -⥪   ० 19.  ஡
.   5.
     
6.10  אַ  ணࠬ  DOS
-----------------------------------------------------------------
     
     ஢   Turbo  Pascal    䨪ᮬ .TPU 
  믮  ᪠. ,   ᪮஢
ணࠬ ⠪  ࠧ,  ⮡      뫮 ।⢥
     ப  DOS,  ᨬ      ᪠.
஢   ࠭  ⠪  ࠧ  ணࠬ  
७ .EXE,  砥 "ᯮ塞 䠩".
     
      ᪠,  ᨬ       ணࠬ,      
ᮧ 䥪⨢  ,    믮 אַ 
 ப DOS.  ,  ᮧ   ᯮ㥬  ⠪
ࠧ, ⠭  ࠪ᪨ ७ﬨ ⠭⭮ 
ணࠬ DOS.
     
      砥,   楤,  ᬮ७   ⮩  ,
 ᯮ짮    ⢥  DOS.   ᫥饬 ࠧ
ਢ ᪮쪮 ਬ஢ ⮣,     ⥯    
 뫮  㯭    ன  DOS MODE.    -
७ DOS, 祭   , ᮤন  ணࠬ
   CGAPALETTE, EGAPALETTE  VGAPALETTE.
     
6.10.1  ਬ   DOS (ணࠬ EGAPALETT)
-----------------------------------------------------------------
     
     ᫥ 樨 ᫥ ணࠬ ⠭  ⮫쪮  
樥 ⥪⮢  ०,        ᯮ짮 
⢥   DOS. ᯮ塞 䠩  室 
, 㯭  DOS,        饭 
 ப.
     
     騩 ⨭  -     ⨭         ணࠬ,
⠢塞     ,       ॡ 
㣨 ணࠬ   㫨    襣    ணࠬ
ᯥ祭.

program EGAPALET;
 uses crt,dos;             { ᯮ ⮫쪮 ⠭ 㫨 }
 type
   VGARegPack = record AL,AH : Integer;
   end;
 var
   ColorNumber,Blue,Green,Red  : Byte;
   x,y,Modd : integer;
 procedure MODE(Input: Integer);
   var
     VGARegs : Registers;
   begin
     with VGARegs do begin             { ⮢ ॣ஢  뢠 }
       AL := Input;                    {  ६  -० }
       AH := $00;                      { 㭪: ⠭ -० }
     end;
     Intr($10,VGARegs);                { 맮 뢠 $10 }
  end;
 procedure FrameColor(ColorNumber:Byte);
   var
    Regs : Registers;
   begin
    with Regs do begin                 { ⮢ ॣ஢  뢠 }
       AL := $01;                      { ⠭ ॣ ࠬ }
       AH := $10;
       BH := ColorNumber;              {  ࠬ }
    end;
    Intr($10,Regs);                    { 맮 뢠 $10 }
  end;
 procedure AssignColor(ColorNumber,Color : byte);
   var
    Regs : Registers;
   begin
    with Regs do begin                 { ⮢ ॣ஢  뢠 }
       AL := $00;
       AH := $10;
       BL := ColorNumber;
       BH := Color;
    end;
    Intr($10,Regs);                    { 맮 뢠 $10 }
  end;
 procedure Palette(ColorNumber,Blue,Green,Red : byte);
   var
    Regs : Registers;
   begin
    with Regs do begin              { ⮢ ॣ஢  뢠 }
       AL := $10;                   { ⠭ ॣ 梥 }
       AH := $10;                   { ⠭ ॣ  }
       BX :=ColorNumber;            {  ⠭ ॣ 梥 }
       CL := Blue;                  { 祭 㡮 }
       CH := Green;                 { 祭  }
       DH := Red;                   { 祭 ᭮ }
    end;
    Intr($10,Regs);                    { 맮 뢠 $10 }
  end;
 procedure Blend(ColrNr1,Blue1,Green1,Red1,
                 ColrNr2,Blue2,Green2,Red2: Byte);
  var Nr,Bl,Gr,Rd: byte;
  begin
    Nr:= ColrNr2 - ColrNr1;
    for x :=0 to Nr do begin
     Bl:= (Blue1*(nr-x) + Blue2*(x)) div nr;
     Gr:= (Green1*(nr-x)+ Green2*(x))div nr;
     Rd:= (Red1*(nr-x)  + Red2*(x))  div nr;
     Palette(ColrNr1+x,Bl,Gr,Rd);
    end;
  end;
 begin                                 { 砫  ணࠬ }
    Mode($11);                         { ० 17 뢠  ॣ }
    Mode($3);                          { ->  ப  ணࠬ }
   directvideo:=false;                 { ன  }
     palette(0,8,6,2) ;                {          }
     palette(1,33,17,15) ;             { 㡮        }
     palette(2,27,35,20) ;             {         }
     palette(3,25,25,15) ;             { ᨭ           }
     palette(4,17,19,33) ;             {         }
     palette(5,24,20,30) ;             { ᨭ         }
     palette(6,12,17,27) ;             { 筥     }
     palette(7,31,33,35) ;             { ᢥ⫮-   }
     palette(8,22,19,17) ;             { ⥬-    }
     palette(9,50,35,29) ;             { ᢥ⫮-㡮 }
     palette(10,50,45,20);             { ᢥ ᨭ   }
     palette(11,26,50,34);             { ᢥ⫮- }
     palette(12,25,47,60);             { ᢥ⫮- }
     palette(13,47,55,62);             { ᢥ ᨭ }
     palette(14,33,56,60);             {          }
     palette(15,57,53,53);             {           }
     palette(16,7,4,12);               { 䮭: 梥 ᭮  }
     for x:= 0 to 15 do AssignColor(x,x);
      textbackground(1);
     textcolor( 0);writeln('          ');
      textbackground(0);
     textcolor( 1);writeln(' 㡮        ');
     textcolor( 2);writeln('         ');
     textcolor( 3);writeln(' ᨭ           ');
     textcolor( 4);writeln('         ');
     textcolor( 5);writeln(' ᨭ         ');
     textcolor( 6);writeln(' 筥     ');
     textcolor( 7);writeln(' ᢥ⫮-   ');
     textcolor( 8);writeln(' ⥬-    ');
     textcolor( 9);writeln(' ᢥ⫮-㡮 ');
     textcolor(10);writeln(' ᢥ ᨭ   ');
     textcolor(11);writeln(' ᢥ⫮- ');
     textcolor(12);writeln(' ᢥ⫮- ');
     textcolor(13);writeln(' ᢥ ᨭ ');
     textcolor(14);writeln('          ');
     textcolor(15);writeln('           ');
     FrameColor(16);
 end.

     
     

     ᪮쪮 ஢    ணࠬ,      ᮧ
楤 CGAPALET.   ⮣ 筮    ப
 ணࠬ    Mode(1).    㣮  䨪樨   
 ணࠬ  VGAPALET.         ப   
ணࠬ ਬ     Modd:=-1;textmode(Modd);.      
  50-筮 ⥪⮢  ०  VGA.  ᫥  樨
ணࠬ VGAPALET.EXE 㤥 ࠡ  ⮬ ०.
     
     㬥,    ॡ      ⭮   ᯥ祭
   ᨫ.      VGA    ᮢ⨬   
    ணࠬ  .   ७
DOS ⠪ ᯮᮡ ࠪ᪨    ࠭祭.  ⥫
ଠ  ᮧ  ᮡ⢥ -७ DOS .
  4.
     
6.11  ⥫ ਬ ணࠬ
-----------------------------------------------------------------
     
        ࠧ  ᬠਢ    ਬ
ணࠬ  Turbo Pascal,      뫨  祭    
VGA19. 뢠  ᪨  䥪   ࠡ,  
ॠ묨   ⤥ ணࠬ, ᪮ ࠧ  
ᠬ ᪨      뫮    㤭⥫쭮.
     
     ணࠬ   ७    ६饭  ࠭ 
⥬ ࠡ   ⤥  ᪨  .  ணࠬ
AURORA.PAS, ࠦ 室 ᮫,    ᮧ .
   ⮩        뫠   ࠧࠡ⠭      TERRAX.PAS,
।⠢   10.
     
6.11.1  ७  ࠭ (Zoom - "")
-----------------------------------------------------------------
     
      ணࠬ  ।  ࠭     
⠪ ࠧ, ⮡    ࠭.  믮 
 ᯥ樠쭮   楤,   ஥         ࠭
। 楤 PEEK  PLOT.
     
     ࠭ 㤢    ࠧ    ࠢ    ࠥ  
।.  ⢥⮩  孮 뢠  
PEEK. ⥬  ࠭ ᮢ뢠    
PLOT    PEEK.   楤 䠪᪮ 㤠
ᥫ   믮,  ᪮  ந室  ᮢ ᥣ
࠭.
     
      䨪樨  楤    믮  㪠
ࠢ ᫥    ஦,     ᠥ ᥫ,
    .        㤠,
,   ࠧ  ,  ८ࠧ  - 㣮,  
㤥 ᮮ⢥⢮ ⨭.
     
     ᪨ 㤠 窨     讣  祭  
ࠡ   ன  VGA.   ᥫ 筮 砥 
 梥⮬  0.   ⠭⭮      筮  
梥.   ⢥ 梥  0     梥
VGA.  㬠  "㤠" ᥫ   ᯮᮡ ᣫ
 ⭮⥫쭮 㦠饣 ⪠.
     
      ਢ      楤     DOUBLE.          
த஢  ᨨ ⮩ ணࠬ.
     
program ZOOM;             {   㢥稢  ࠭ }
 uses
   crt,dos,vga19;
 var
   xx,yy,zz,aa,bb : Integer;
 procedure DOUBLE;                 { ணࠬ }
 var x,y,xz,yz,Color : integer;
 begin
  for x:=79 to 159 do begin
  for y:=49 to 99 do begin
    Peek (x,y,Color);
     xz:=x-159;xz:=xz*2+158;
     yz:=y-99 ;yz:=yz*2+98;
     Plot (xz,yz,Color); Plot(xz+1,yz,Color);
     Plot(xz,yz+1,Color);Plot(xz+1,yz+1,Color);
    Peek (319-x,y,Color);
     xz:=319-x-159;xz:=xz*2+158;
     yz:=y-99 ;yz:=yz*2+98;
     Plot (xz,yz,Color); Plot(xz+1,yz,Color);
     Plot(xz,yz+1,Color);Plot(xz+1,yz+1,Color);
    Peek (x,199-y,Color);
     xz:=x-159;xz:=xz*2+158;
     yz:=199-y-99 ;yz:=yz*2+98;
     Plot (xz,yz,Color); Plot(xz+1,yz,Color);
     Plot(xz,yz+1,Color);Plot(xz+1,yz+1,Color);
    Peek (319-x,199-y,Color);
     xz:=319-x-159;xz:=xz*2+158;
     yz:=199-y-99 ;yz:=yz*2+98;
     Plot (xz,yz,Color); Plot(xz+1,yz,Color);
     Plot(xz,yz+1,Color);Plot(xz+1,yz+1,Color);
   end;end;  {  ணࠬ }
 end;
begin                                  {  ணࠬ }
 directvideo:=false;
 Mode($13);
 randomize;
 Janspalette;
   Palette(0,14,30,35);Listpalette;
   for xx:=0 to 25 do begin
     zz:=random(30)+160-random(30);yy:=random(40)+80;
     aa:=random(17);bb:=random(aa)+1;
     Disk(zz,yy,aa,bb,random(255));
     SmoothCircle(zz,yy,aa,bb);
   end;
   Double; Double; Double;
end.

      ணࠬ, BIGGER, ।⠢ ᮡ 㣮 ᯮᮡ
ॠ樨      ࠭.      ࠧ  ᯮ
⮤ "ਧ樨".
     
        㤥  ᮧ    ᥫ   ᥫ
室 ࠦ.   ⨭ 㢥稢  ।⢮
饭       室   ᥫ    
ᥫ (䠪᪨  ᥫ  梥⮬ 0  ⥪饩 ).
     
Program BIGGER;
 Uses crt,dos,vga19;
 Var ch : char;
 Procedure Starpalette;                { 256 梥⮢  }
  begin    Palette(0,9,3,3);
   Blend(1,6,1,12, 15,10,13,27);       {  ૨     }
   Blend(15,10,13,27,30,10,21,33);     { ࠭     }
   Blend(30,10,21,33,40,18,32,36);     {         }
   Blend(40,18,32,36,50,22,40,36);     { -   }
   Blend(50,22,40,36,180,58,45,43);    {       }
   Blend(180,58,45,43,255,63,45,63);   {       }
   DimPercent(0,255,10);
 end;
 procedure DoubleDouble;               { 㢥稢 業 ࠭ }
 var x,y,xz,yz,Color : integer;        {  ० 19            }
 begin
  for x:=79 to 159 do begin            { ࠭ 業 x/y }
   for y:=49 to 99 do begin
    Peek (x,y,Color);                  { 孨  ࠭ }
     xz:=x-159;xz:=xz*2+158;           { 㢥 x }
        yz:=y-99 ;yz:=yz*2+98;         { 㢥 y }
     Plot (xz,yz,Color);               { ᮢ/ 窨 }
     Plot(xz+1,yz,0);Plot(xz,yz+1,0);Plot(xz+1,yz+1,0);
    Peek (319-x,y,Color);              { 孨 ࠢ ࠭ }
     xz:=319-x-159;xz:=xz*2+158;       { 㢥 x }
     yz:=y-99 ;yz:=yz*2+98;            { 㢥 y }
     Plot (xz,yz,Color);               { ᮢ/ 窨 }
     Plot(xz+1,yz,0);Plot(xz,yz+1,0);Plot(xz+1,yz+1,0);
    Peek (x,199-y,Color);              {   ࠭ }
     xz:=x-159;xz:=xz*2+158;           { 㢥 x }
     yz:=199-y-99 ;yz:=yz*2+98;        { 㢥 y }
     Plot (xz,yz,Color);               { ᮢ/ 窨 }
     Plot(xz+1,yz,0);Plot(xz,yz+1,0);Plot(xz+1,yz+1,0);
    Peek (319-x,199-y,Color);          {  ࠢ ࠭ }
     xz:=319-x-159;xz:=xz*2+158;       { 㢥 x }
     yz:=199-y-99 ;yz:=yz*2+98;        { 㢥 y }
     Plot (xz,yz,Color);               { ᮢ/ 窨 }
     Plot(xz+1,yz,0);Plot(xz,yz+1,0);Plot(xz+1,yz+1,0);
   end;
  end;
    end;
 begin                                 { 砫  ணࠬ }
   Mode($13);Starpalette;
   palette(127,63,45,63); directvideo:=false;
   repeat  gotoxy(1,11);
   ColorText(127);write( ' ࠭' );
    DoubleDouble;
      { ।  ࠭ 㢥稢,   }
    gotoxy(1,12);ColorText( 8);write( 'Do ' );
    ColorText(11);write('');ColorText(14);write( ' ');
    ColorText(16);write(' ');ColorText(18);write( '' );
    ColorText(20);write('');ColorText(22);write( '' );
    ColorText(24);write(''  );ColorText(26);write( ' ' );
    ColorText(28);write('' );ColorText(30);write( '' );
    ColorText(32);write(' ' );ColorText(34);write( '' );
    ColorText(36);write(' ');ColorText(38);write( ' ' );
    ColorText(48);write('?' );
    for Z:=0 to 3000 do begin
      X:=random(320);Y:=random(200);
      Color:=random(random(random(250)))+1;
      Plot(X,Y,Color);{ 㥬  }
      if keypressed then z:=3000;
    end;
   until keypressed;
 end.

                                     
6.11.2  襭  ࠭ ("ꥧ")
-----------------------------------------------------------------
     
      ணࠬ ,   㬥 
࠭.     砥  㬥襭    ࠭  ⮨ 
 祪 室 ࠭.
     
      梥⮢   室 祪    ᯮ
ᮢ⨬     ।  梥  믮 楤ன
REFERENCECOLOR   Pascal VGA19.  ஡  ᠭ .
  6.6.6.
     
     ᪮ ணࠬ   ।   梥      ᥫ,
ꥤ    ।,    ⨭    㬥襭
ਠ 㤥  ﭠ.  ᫨  ॠ  ணࠬ ⮤
㤠 ᥫ,       ।,        
⥫쭥.
     
     
 program REDUCE;
 uses crt,dos,vga19;  {  ணࠬ, 祭 㫥 }
 var
 ch:char;
 procedure Half;      { 砫 ணࠬ }
 var x,y,xz,yz,Bl1,Gr1,Re1,Bl2,Gr2,Re2,Bl3,Gr3,Re3,Bl4,Gr4,Re4,
     Rp,Blue,Green,Red,Color : integer;
 begin   { 砫  ⥫ ணࠬ }
  for y:=50 to 99 do begin
   for x:=80 to 159 do begin

    xz:=x-159;xz:=xz*2+158;
    yz:=y-99 ;yz:=yz*2+98;
    peeklist(xz,yz    ,Bl1,Gr1,Re1);
    peeklist(xz+1,yz  ,Bl2,Gr2,Re2);
    peeklist(xz,yz+1  ,Bl3,Gr3,Re3);
    peeklist(xz+1,yz+1,Bl4,Gr4,Re4);
    Blue:=(Bl1+Bl2+Bl3+Bl4)div 4;
    Green:=(Gr1+Gr2+Gr3+Gr4)div 4;
    Red:=(Re1+Re2+Re3+Re4)div 4;
    ReferenceColor(Rp,Color,Blue,Green,Red);
    plot (x,y,Color);

    xz:=319-x-159;xz:=xz*2+158;
    yz:=y-99 ;yz:=yz*2+98;
    peeklist(xz,yz    ,Bl1,Gr1,Re1);
    peeklist(xz+1,yz  ,Bl2,Gr2,Re2);
    peeklist(xz,yz+1  ,Bl3,Gr3,Re3);
    peeklist(xz+1,yz+1,Bl4,Gr4,Re4);
    Blue:=(Bl1+Bl2+Bl3+Bl4)div 4;
    Green:=(Gr1+Gr2+Gr3+Gr4)div 4;
    Red:=(Re1+Re2+Re3+Re4)div 4;
    ReferenceColor(Rp,Color,Blue,Green,Red);
    plot (319-x,y,Color);

    xz:=x-159;xz:=xz*2+158;
    yz:=199-y-99 ;yz:=yz*2+98;
    peeklist(xz,yz    ,Bl1,Gr1,Re1);
    peeklist(xz+1,yz  ,Bl2,Gr2,Re2);
    peeklist(xz,yz+1  ,Bl3,Gr3,Re3);
    peeklist(xz+1,yz+1,Bl4,Gr4,Re4);
    Blue:=(Bl1+Bl2+Bl3+Bl4)div 4;
    Green:=(Gr1+Gr2+Gr3+Gr4)div 4;
    Red:=(Re1+Re2+Re3+Re4)div 4;
    ReferenceColor(Rp,Color,Blue,Green,Red);
    plot (x,199-y,Color);

    xz:=319-x-159;xz:=xz*2+158;
    yz:=199-y-99 ;yz:=yz*2+98;
    peeklist(xz,yz    ,Bl1,Gr1,Re1);
    peeklist(xz+1,yz  ,Bl2,Gr2,Re2);
    peeklist(xz,yz+1  ,Bl3,Gr3,Re3);
    peeklist(xz+1,yz+1,Bl4,Gr4,Re4);
    Blue:=(Bl1+Bl2+Bl3+Bl4)div 4;
    Green:=(Gr1+Gr2+Gr3+Gr4)div 4;
    Red:=(Re1+Re2+Re3+Re4)div 4;
    ReferenceColor(Rp,Color,Blue,Green,Red);
    plot (319-x,199-y,Color);

   end;
  end;
 end;   {  楤 }

begin   {  ணࠬ }
 directvideo:=false;
 Mode($13);
 Randomize;
 Janspalette;
 Listpalette;
 for x:=0 to 100 do begin
  disk(random(320),random(200),random(50),random(40),Random(255));
 end;
 ColorText(96);
 writeln('A B C D E F G H I J K L M N O P Q R S T ');
 writeln('    U V W X Y Z 1 2 3 4 5 6 7 8 9 0  ');
 writeln('a b c d e f g h i j k l m n o p q r s t ');
 writeln('    u v w x y z !.;,:-? +( % ) * " $ ');
 writeln('                                        ');
 Half;
 Zerokey;ch:=readkey;
end.

    
6.11.3  ६饭 ࠦ
-----------------------------------------------------------------
     
      ணࠬ,   ROLLDEMO,   ६頥    ࠭    
ਧ⠫.    ⮣    ⨪  ⮫  ᥫ
६ ࠭  ,   ⥬ ᮢ뢠   
樨 ࠭. 맮 ⮩ ணࠬ 320 ࠧ ਢ  
ᬥ饭 ⨭ १ ࠭.
     
      楤 ࠡ⠥ ⭮⥫쭮 ,   ⮬  
 䥪  ஫ ࠭.
     
     
program ROLLDEMO;         { ᬥ饭 ᮤন ࠭ }
 uses crt,vga19;
 var  x,y,z : integer;
 Procedure ScrollLeft;
  var Degrees,x,y : integer;
      Save: array[0..199] of integer;
  begin
   for x:=0 to 319 do begin
    for y:=0 to 199 do begin
     Peek(x,y,Save[y]);
    end;
    for y:=0 to 199 do begin
     if x<>319 then Peek(x+1,y,Degrees) else Peek(0,y,Degrees);
     Plot(x+319,y,Save[y]);
     Plot(x,y,Degrees);
    end;
   end;
 end;
 begin
  randomize;
  directvideo:=false; Mode($13);
  Janspalette; ColorText(100);
  ShowPalette; Listpalette;
  Disk(100,100,50,30,200);
  repeat
    ScrollLeft;
  until keypressed;
end.

        
6.11.4   室 ᮫, ணࠬ Aurora
-----------------------------------------------------------------
     
      ணࠬ   ᮧ   ਠ樨  ⨭    
 砩   ᥫ   .        ⨭
ࠦ 室  ᮫    ६.   砩 ᥫ
ᯮ  ᮧ ࠦ    .    ⮩
ணࠬ 㦥   VGA19.TPU/VGA19.PAS,   ஬ 室
室 ᪨ 楤.
     
     ࢠ   ணࠬ  뢮      ⥪,
᫥ 祣 稭 믮  横 ணࠬ.  ⮬
横 祭 ਭ ࠦ  ᮫,  梥  ,    
  ஬ 砩 ᥫ.
     
     ᫥ ⠭  樨  ਧ (⠪ ।
஬)  ࠭ 뢠 梥 .  ⥬    ࠭
頥 ᮫.  ,  .  ⠪
। 䥪 ⥭  .    ⥬ 
ࠦ  .
     
         뫮  ᣫ,   訫  
ࠦ,   ணࠬ ७  뫠 祭 
ணࠬ, ⮡  ⨭  ᮢ  ॥.  ⢥騥
    ணࠬ .
     
       蠥 ᮧ 孥    ࠦ.
⥬  㭮  .   筮 .
 ᢥ 梥⮬  ࠦ    ᮫,    
䥪 ᮫     .     ᫥ ⥪⮢
楤   ࠭ ந ࠧ 㥬  
.
     
      横  ணࠬ  । ᮧ  㭪 
    .    ணࠬ  -    
 <Esc>.
     
program aurora;

 uses crt,vga19;

 var x,y,z,n,zx,zy,sx,sy,Nm : integer;
     c,Bu   : char;
     SkyColor,CloudColor,  WaterColor,
     SunColor,SunSize,   Horizontal,
     IslandColor,BreakerColor,VegetationColor : Integer;
     Name : string;

 Procedure ScrollLeft;
  var
   Degrees,x,y : integer;
   SaveIt: array[0..199] of integer;
  begin
   for x:=0 to 319 do begin
    for y:=0 to 199 do begin
     peek(x,y,SaveIt[y]);
    end;
    for y:=0 to 199 do begin
     if x<>319 then peek(x+1,y,Degrees) else peek(0,y,Degrees);
     plot(x,y,Degrees);
     plot(x-1,y,SaveIt[y]);
    end;
   end;
 end;

 begin
  Randomize;
  directvideo := false;
  VMode($13);
  Janspalette;
  Palette(0,13,15,10);
  gotoxy(1,1);TextColor(6);write('   , ६, ଠ     ');
  gotoxy(1,3);TextColor(5);write('  Abacus 5370 52nd SE, GR MI  49512  ');
  gotoxy(1,5);TextColor(4);write('  ணࠬ ᠭ  Turbo Pascal');
  gotoxy(1,7);TextColor(3);write('  ᯮ  VGA19 ().);
  gotoxy(1,9);TextColor(2);write('  ᯮ ⮭ 梥     ');
  gotoxy(1,11);TextColor(1);write(' 㣨 梥.                          ');
  gotoxy(1,15);TextColor(115);write('  ⨨  AURORA ᮧ    ');
  gotoxy(1,17);TextColor(117);write(' 㭮  .               ');
  gotoxy(1,19);TextColor(119);write(' ⨥ Esc 蠥 ணࠬ.     ');
  c:=readkey;
  Border(0);
  repeat
   SunSize:=16*(random(random(16))+1);Horizontal:=100+Random(60)-Random(20);
   SkyColor:=12*SunSize+2;
   WaterColor:=SkyColor+6;SunColor:=SunSize+Random(Random(4));
   CloudColor :=SkyColor-16;
   SunSize:=SunSize div 4 +Random(4);
   for y:=0 to Horizontal-2 do begin
    for x:=0 to 319 do begin
     plot(x,y,-random(y div 10)*16+SkyColor);
     plot(x,Horizontal-Random(Random(Random(Horizontal))),-random(y div 10)*16+SkyColor);
    end;
   end;
   sx:=Random(300)+5; sy:=Random(Horizontal-10)+5;
   if SunColor=0 then SunColor:=1;
   disk  (sx,sy,SunSize+2,SunSize,SunColor);
   circle(sx,sy,SunSize+2,SunSize,SunColor+1);
   for y:=0 to SunSize do begin
    zx:=Random(319+1); zy:=Random(Horizontal);
    for x:= 0 to 500 do begin
      plot(zx+Random(Random(Horizontal))-Random(Random(Horizontal)),zy+Random(2)-Random(6),CloudColor-random(2));
      plot(zx+Random(Random(Horizontal))-Random(Random(Horizontal)),zy+Random(6)-Random(2),CloudColor+2-random(2));
    end;
   end;
   for x:=0 to  319 do begin
     plot(x,Horizontal-1,SkyColor+1);
     plot(x,Horizontal,SkyColor+4);
     plot(x,Horizontal+1,WaterColor);
   end;
   for y:=199 downto Horizontal do begin
    for x:=0 to 319 do begin
     plot(x,Horizontal+199-y,random((199-y)div 14)+WaterColor);
     plot(x,Random(Horizontal)+Horizontal+2,Random(2)+WaterColor);
     plot(sx+Random(random(random(y)))-Random(random(random(y))),Horizontal+199-y,WaterColor-random(5)-34);
    end;
   end;
   Gotoxy(1,24);TextColor(121);write('Sunrise on the planet ');
   Nm:=random(5)+1;Name:='';
   for n:=0 to NM do begin
     Bu:=chr(random(26)+65);
     if Bu='C' then Bu:='E';if Bu='J' then Bu:='I';
     if Bu='Q' then Bu:='A';if Bu='V' then Bu:='U';
     if Bu='X' then Bu:='O';if Bu='Y' then Bu:='E';
     Name:=Bu+Name;
   end;
   write(Name);
   for x:=1 to 1 do ScrollLeft;
   c:=readkey;
  until c=chr(27);
end.
                                                                         

6.12 ᪮쪮 ⥫ ᫮  
     ७ Turbo Pascal
-----------------------------------------------------------------
     
         ।⠢           ணࠬ
뢠,  ࠧ  ணࠬ஢   -०
19  VGA   MCGA,     ⮣   設
 .
     
     모 Turbo Pascal  Turbo BASIC  ⢮ ⥩
 ᮧ    ணࠬ,   ᯮ짮
२⢠ 䨪 VGA.
     
      ⮣       ᯮ짮    ,    㫨騥
ॣࠬ, 맮  뢠      㯮   ࠭
.  ⮬ 모 ணࠬ஢,  騥 
। ணࠬ஢ 䨪  -० 19,   
.
     
     ᯮ짮 Turbo Pascal  २⢮  窨  ७
᪮ 믮   ணࠬ.  ணࠬ    Turbo  Pascal  
᪮ ࠪ᪨ ⫨稬  ᠭ  設 .
     
      ணࠬ,   室   Turbo  Pascal,  ࠧ
      ࠢ  ணࠬ  몥
ᥬ  設 .
     
     ணࠬ   Turbo  BASIC         ,   祬
ணࠬ    Turbo   Pascal.      業   ⮣  
⢥   믮,        
⢮ ᪨ 䥪⮢.
     
         ⮪   ᨪ,  -  ண  
ணࠬ    ᫮ 몠, ⠪  ᪠
 .
     
6.13  ᮪  楤  ᪠
-----------------------------------------------------------------
     
     楤   6:
     
     procedure Mode(ModeHexNumber:integer);
     procedure Mode19;
     procedure FrameColor(ColorNumber:integer);
     procedure ColorText(Color:integer);
     procedure Palette(ColorNumber,Blue,Green,Red:integer);
     procedure Blend(ColorNumber1,Blue1,Green1,Red1,
     ColorNumber2,Blue2,Green2,Red2:integer);
     procedure ShowPalette;
     procedure JansPalette;
     procedure AssignColor(ColorNumber,Color:integer);
     procedure Plot(x1,y1:integer;Color:integer);
     procedure Peek(x1,y1:integer;var OldColor:integer);
     procedure Block(x1,y1,x2,y2:integer;Color:integer);
     procedure Circle(xm,ym,a,b:LongInt;Color:integer);
     procedure Disk(xm,ym,a,b:LongInt;Color:integer);
     procedure Line(x1,y1,x2,y2:integer;Color:integer);
     procedure Frame(x1,y1,x2,y2:integer;Color:integer);
     procedure Feather(x1,y1,x2,y2:integer;
     Color1,Color2:integer);
     procedure Horizontal(x1,x2,y:integer;
     Color1,Color2:integer);
     procedure Ball(xm,ym,a,b:LongInt;
     Color1,Color2:integer);
     procedure Column(x1,y1,x2,y2:integer;
     Color1,Color2:integer);
     procedure MixHorizontal(x1,x2,y:integer;
     Color1,Color2,Mix:integer);
     procedure MixBall(xm,ym,a,b:LongInt;
     Color1,Color2,Mix:integer);
     procedure MixColumn(x1,y1,x2,y2:integer;
     Color1,Color2,Mix:integer);
     procedure ReadPalette(ColorNumber:integer;
     var Blue,Green,Red:integer);
     procedure PeekPalette(var x,y,
     Blue,Green,Red:integer);
     procedure ListPalette;
     procedure PeekList(x,y:integer;
     var Blue,Green,Red:integer);
     procedure Similar(var Number,
     Blue,Green,Red:integer);
     procedure ReferenceColor(var Rtg,Number,
     Blue,Green,Red:integer);
     procedure Antalia(x1,y1,x2,y2:integer);
     procedure Smooth(x,y:integer);
     procedure SmoothCircle(xm,ym,a,b:LongInt);
     procedure Dim(Number1,Number2,Add:integer);
     procedure GrayScale(ColorNumber,Count:Byte);
     procedure ZeroKey;
     procedure Character(cc:string);
     procedure HandWriting(cc:string);
     procedure MiniTextXY(x,y:integer);
     procedure MiniPrint(As:string);
     procedure GlasPrint(As:string);
     procedure HandWritingPrint(As:string);
                          
     楤  ਬ஢ ணࠬ   6 - 10:
     
     procedure Double;
     procedure DoubleDouble;
     procedure Half;
     procedure RollLeft;
     procedure SunPalette;
     procedure ShowSystem(NewName:Boolean);
     procedure ShowSun;
     procedure ShowDevelopment;
     procedure SolarSystem;
     procedure ProgramDescription;
     procedure SunRise(Select:Boolean);
     
