Category : Files from Magazines
Archive   : PJ83.ZIP
Filename : UPROGRAM.PAS

 
Output of file : UPROGRAM.PAS contained in archive : PJ83.ZIP
(* uprogram.pas -- (c) 1989 by Tom Swan *)

unit uprogram;

interface

uses crt, ukeys, ucmds, ulist, umenu;

procedure run;

var

theMenu : menu;

implementation

{ ----- Private command object. }

type

quitObj = object( command )
procedure processItem; virtual;
end;

var

quitCmd : quitObj;

{$IFDEF DEBUG}
startmem : longint; { Holds memavail at startup for debugging }
{$ENDIF}

{ ----- Run the program. }

procedure run;
begin
quitCmd.init( @theMenu, 'Q', 'Quit' );
theMenu.performCommands;
theMenu.done;
gotoxy( 1, hi( windmax ) + 1 );
writeln;
{$IFDEF DEBUG}
writeln( 'mem at start = ', startmem ); { display statistics }
writeln( 'mem at end = ', memavail );
{$ENDIF}
end;

{ ----- Implement the Quit command. }

procedure quitObj.processItem;
begin
pushKey( chr(27) ); { Simulate keypress }
end;

begin
{$IFDEF DEBUG}
startmem := memavail; { Record memavail at startup }
{$ENDIF}
theMenu.init( 1, hi( windmax ) + 1, 'Test:', WHITE + BLUE * 16 );
end.


  3 Responses to “Category : Files from Magazines
Archive   : PJ83.ZIP
Filename : UPROGRAM.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/