home *** CD-ROM | disk | FTP | other *** search
- { TURBO VIDEO UTILITY PROCEDURES
-
- William P. Smith, Author.
- Mitchellville, MD.
- March 1985.
-
- Software for the Public Domain. }
-
-
- Type
- Line = String[80];
- GraphFileName = String[15];
-
-
- {----------------------------------------------------------------------------}
-
- Procedure LoadGraf(Name: GraphFileName; Color: Integer);
-
- {This procedure loads a disk file of High resolution graphics into the Buffer
- and then Move's the Buffer contents into Video memory.
-
- The use of Move with two or more Buffers allows rapid swapping of graphics
- in and out of Video!!! This results in the appearance of motion and can
- be used to construct animation or moving pictures such as the spheres in
- my demonstration. }
-
-
-
- Var
- Scrnfil: File;
- Buffer: Array[1..$4000] of Byte;
- Video: Byte Absolute $B800:0000;
-
- Begin
- Assign(Scrnfil,Name); Reset(Scrnfil);
- Blockread(Scrnfil,Buffer,128);
- Close(Scrnfil);
- Hires; Hirescolor(Color);
- Move(Buffer,Video,$4000);
- Repeat Until Keypressed;
- Textmode(2);
- End;
-
- {--------------------------------------------------------------------------}
-
- {This procedure stores High Resolution Graphics from the screen to disk. }
-
- Procedure GrafSave(Name: GraphFileName);
-
-
-
- Var
- Scrnfil: File;
- Buffer: array[1..$4000] of Byte;
- Video: Byte Absolute $B800:0000;
-
- Begin
- Assign(Scrnfil,Name); rewrite(Scrnfil);
- Move(Video,Buffer,$4000);
- Blockwrite(Scrnfil,Buffer,128);
- Close(Scrnfil);
- End;
-
- {----------------------------------------------------------------------------}
-
- {This procedure writes text with the selected Video attribute. This allows
- full access to any combination of reverse, intensified, and blinking text
- display. Note: VideoSeg=$B000 for IBM Monochrome Display, otherwise
- VideoSeg=$B800.}
-
- Procedure Vwrite(St: Line; Attribute: Byte);
- var X,Y,i: Integer;
- begin
- X:=whereX; Y:=whereY;
- write(st);
- for i:=1 to length(St) do mem[VideoSeg:2*((Y-1)*80+i+X-2)+1]:=attribute;
- end;
- {------------------- ATTRIBUTE BYTE ---------------------------}
- { BIT: Effect }
- { 7: Blink 0=normal 1=blinking }
- { 6,5,4: Background 000=black 111=white }
- { 3: Intensity 0=normal 1=intensified }
- { 2,1,0: Foreground 000=black 111=white }
- {----------------------------------------------------------------}
- {begin
- Vwrite('normal',$7); writeln;
- Vwrite('reverse',$70); writeln;
- Vwrite('blinking',$87); writeln;
- Vwrite('blinking intensified',$8F); writeln;
- Vwrite('reverse intensified',$78); writeln;
- Vwrite('intensified',$F); writeln;
- Vwrite('reverse blinking',$F0); writeln;
- Vwrite('reverse blinking intensified',$F8);
- end.}
-