home *** CD-ROM | disk | FTP | other *** search
- {$G+}
- program Plazma;
-
- uses Crt;
-
- var
- screen : Array[1..64000] of byte absolute $0a000:$0000;
- paletta: Array[0..764] of byte;
- buff : Array[0..2] of byte;
- fi : File;
- TempB : Byte;
-
- Procedure SetRGB(colnum, Red, Green, Blue: Byte);Assembler;
- Asm
- mov dx,$3c8
- mov al,colnum
- out dx,al
- inc dx
- mov al,red
- out dx,al
- mov al,green
- out dx,al
- mov al,blue
- out dx,al
- End;
-
- Procedure Graph;Assembler;
- Asm
- mov ax,$13
- int $10
- End;
-
- Procedure Backtotext;Assembler;
- Asm
- mov ax,$3
- int $10
- End;
- { A paletta mozgatása }
- Procedure Palanim;
- Begin
- move(paletta,buff,3);
- move(paletta[3],paletta,762);
- move(buff,paletta[762],3);
- asm
- cld
- mov dx,$3c8
- mov al,1
- out dx,al
- lea si,paletta
- inc dx
- mov cx,255*3
- rep outsb
- end;
- End;
-
- BEGIN
- Graph;
-
- assign(fi,'plasma.dat');
- TempB:=FileMode; {Elmentjuk az aktuális FileMode értékét !}
- FileMode := 0; {Csak olvasásra nyitjuk meg, mert a PC-X CD-n a PLASMA.DAT
- read-only és a Pascal hörögne ha írásra akarnánk megnyitni
- egy read-only file-t !}
- {$I-}
- reset(fi, 1);
- {$I+}
- if IOResult <> 0 then begin
- WriteLn;
- WriteLn('Hoops ... Valami nem stimmel, nem sikerült megnyitni a PLASMA.DAT-ot !');
- Halt($FF);
- end;
- blockread(fi, screen, 64000);
- blockread(fi, paletta, 764);
- close(fi);
- FileMode:=TempB;
-
- repeat { Palettaanimáció }
- palanim;
- delay(10);
- until keypressed;
-
- readkey;
- backtotext;
- END.
-