home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MADTRB33.ZIP / MAINEXAM.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-02-10  |  972 b   |  40 lines

  1.  
  2.   {$V-}
  3. PROGRAM mainexam;
  4.     {-demonstrate BigTurbo techniques}
  5.  
  6.     {first BigTurbo include file - before anything else}
  7.     {$I main1.inc}
  8.  
  9.     {all your global variables and declarations are in following file}
  10.     {$I exam.glo}
  11.  
  12.     {your own procedures follow}
  13.  
  14.   PROCEDURE mainproc1;
  15.       {-demonstrate getting to and from the extra segment}
  16.     BEGIN
  17.       MakeLongCall('farproc2');
  18.     END;                      {mainproc1}
  19.  
  20.   PROCEDURE mainproc2;
  21.       {-demonstrate getting to and from the extra segment}
  22.     BEGIN
  23.       WriteLn('got to mainproc2 from far segment');
  24.     END;                      {mainproc1}
  25.  
  26.     {second BigTurbo include file - after all other procedures}
  27.     {$I main2.inc}
  28.  
  29.   BEGIN
  30.     {load far code}
  31.     LoadFarCode('farexam.com');
  32.  
  33.     {your code follows}
  34.     WriteLn('in main program');
  35.     WriteLn('calling local procedure mainproc1');
  36.     mainproc1;
  37.     WriteLn('back from mainproc1');
  38.  
  39.   END.
  40.