Category : Files from Magazines
Archive   : PJ83.ZIP
Filename : UPROGRAM.PAS
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
end;
begin
{$IFDEF DEBUG}
startmem := memavail; { Record memavail at startup }
{$ENDIF}
theMenu.init( 1, hi( windmax ) + 1, 'Test:', WHITE + BLUE * 16 );
end.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/