home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m110 / 1.ddi / HLL / TP3 / GRASPTP3.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1990-02-12  |  1.3 KB  |  36 lines

  1. (*
  2.              Turbo Pascal program demonstrating a method
  3.              of interfacing to GRASP
  4.  
  5.              Compile with mInimum and mAximum dynamic memory
  6.              as small as possible. A size of 250 works with
  7.              this demo.
  8. *)
  9.  
  10. Type LString = String[255];
  11.  
  12. Var                                     (* register data type *)
  13.   Reg: record case integer of
  14.     1: (ax,bx,cx,dx,bp,si,di,ds,es,flags : integer);
  15.     2: (al,ah,bl,bh,cl,ch,dl,dh : byte);
  16.   end;
  17.  
  18. Procedure Grasp(S:LString);
  19. begin
  20.   Reg.ah := byte('G');                  (* Function 'G' *)
  21.   Reg.cx := Length(S);                  (* String length in CX *)
  22.   Reg.es := Seg(S);                     (* ES:DX points to string *)
  23.   Reg.dx := Ofs(S)+1;                   (* Skip past length byte *)
  24.   Intr($10,Reg);                        (* Do the interrupt 10h *)
  25. end;
  26.  
  27. Begin                                   (* Main routine *)
  28.   Grasp('Video A');                     (* Set video mode -- must be done
  29.                                            here in Turbo Pascal 3.0 because
  30.                                            the Turbo runtime package alters
  31.                                            the video mode *)
  32.   Grasp('Pload Grasp,1');               (* Load a picture *)
  33.   Grasp('Pfade 0,1');                   (* Fade it onto the screen *)
  34.   Grasp('Waitkey');
  35. End.
  36.