home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / TASMSWAN.ZIP / PASDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1989-07-17  |  890b  |  40 lines

  1. PROGRAM PasDemo;
  2.  
  3. { Test program, to be linked to externals in PASDEMO.OBJ }
  4. {$D+}        { include debugging info }
  5.  
  6. CONST    value : Integer = 1234;        { typed-constant declaration }
  7.  
  8. TYPE    IntPtr = Integer;        { pointer to integer type }
  9.  
  10. VAR    cr,lf : Char;            { Global variables }
  11.  
  12. PROCEDURE PasProc; FORWARD;
  13. FUNCTION PasFunc: Char; FORWARD;
  14.  
  15. {$L PASDEMO.OBJ}    { tell Turbo Pascal to load the assembled object code }
  16.  
  17. { External declarations, telling Turbo Pascal the format of the
  18.     external routines in PASDEMO.asm }
  19.  
  20. PROCEDURE AsmProc; EXTERNAL;
  21. FUNCTION CountPtr: IntPtr; EXTERNAL;
  22.  
  23. PROCEDURE PasProc;
  24. VAR    i : Integer;
  25. BEGIN
  26.     Writeln( 'PasProc: Inside the Pascal procedure' )
  27. END;  { PasProc }
  28.  
  29. FUNCTION PasFunc: Char;
  30. BEGIN
  31.     PasFunc := '#'
  32. END;    { PasFunc }
  33.  
  34. BEGIN
  35.     cr := chr( 13 );
  36.     lf := chr( 10 );
  37.     AsmProc;
  38.     Writeln( 'Main: asmCount = ', countPtr^ )
  39. END.
  40.