home *** CD-ROM | disk | FTP | other *** search
- (*
- Turbo Pascal program demonstrating a method
- of interfacing to GRASP
-
- Compile with mInimum and mAximum dynamic memory
- as small as possible. A size of 250 works with
- this demo.
- *)
-
- Type LString = String[255];
-
- Var (* register data type *)
- Reg: record case integer of
- 1: (ax,bx,cx,dx,bp,si,di,ds,es,flags : integer);
- 2: (al,ah,bl,bh,cl,ch,dl,dh : byte);
- end;
-
- Procedure Grasp(S:LString);
- begin
- Reg.ah := byte('G'); (* Function 'G' *)
- Reg.cx := Length(S); (* String length in CX *)
- Reg.es := Seg(S); (* ES:DX points to string *)
- Reg.dx := Ofs(S)+1; (* Skip past length byte *)
- Intr($10,Reg); (* Do the interrupt 10h *)
- end;
-
- Begin (* Main routine *)
- Grasp('Video A'); (* Set video mode -- must be done
- here in Turbo Pascal 3.0 because
- the Turbo runtime package alters
- the video mode *)
- Grasp('Pload Grasp,1'); (* Load a picture *)
- Grasp('Pfade 0,1'); (* Fade it onto the screen *)
- Grasp('Waitkey');
- End.
-