home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 181.img / TASM-101.ZIP / SAMPLE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-10-31  |  948b  |  45 lines

  1. unit Sample;
  2. { Sample unit that defines several pascal procedures that are
  3.   called from an assembly language procedure. }
  4. interface
  5.  
  6. procedure TestSample;
  7.  
  8. procedure PublicProc;         { Must be far since it is visibleoutside }
  9.  
  10. implementation
  11.  
  12. var
  13.   A : word;
  14.  
  15. procedure AsmProc; external;
  16. {$L ASMPROC.OBJ}
  17.  
  18. procedure PublicProc;
  19.   begin { PublicProc }
  20.     Writeln('In PublicProc');
  21.   end;  { PublicProc }
  22.  
  23. procedure NearProc;           { Must be near }
  24.   begin { NearProc }
  25.     Writeln('In NearProc');
  26.   end;  { NearProc }
  27.  
  28. {$F+}
  29. procedure FarProc;            { Must be far due to compilerdirective }
  30.   begin { FarProc }
  31.     Writeln('In FarProc');
  32.   end;  { FarProc }
  33.  
  34. {$F-}
  35.  
  36. procedure TestSample;
  37.   begin { TestSample }
  38.     Writeln('In TestSample');
  39.     A := 10;
  40.     Writeln('Value of A before ASMPROC = ',A);
  41.     AsmProc;
  42.     Writeln('Value of A after ASMPROC = ',A);
  43.   end { TestSample };
  44.  
  45. end.