home *** CD-ROM | disk | FTP | other *** search
- {--------------------------------------------------------------}
- { ShellOut }
- { }
- { "Shell to DOS" with screen save demonstration program }
- { }
- { by Jeff Duntemann }
- { Turbo Pascal V5.0 }
- { Last update 7/17/88 }
- { }
- { From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
- { Scott, Foresman & Co., Inc. 1988 ISBN 0-673-38355-5 }
- {--------------------------------------------------------------}
-
- PROGRAM ShellOut;
-
- {$M 16384,16384,16384} { Reserve some heap to save the screen }
-
- USES DOS,CRT,BoxStuff; { Boxstuff described in Section 17.3 }
-
- TYPE
- AdapterType = (None,MDA,CGA,EGAMono,EGAColor,VGAMono,
- VGAColor,MCGAMono,MCGAColor);
-
- VAR
- Stash : Pointer;
-
-
- {$I WRITEAT.SRC} { Described in Section 18.3 }
- {$I QUERYDSP.SRC} { Described in Section 18.4 }
- {$I FONTSIZE.SRC} { Described in Section 18.4 }
- {$I SAVESCRN.SRC} { Described in Section 20.10 }
- {$I RSTRSCRN.SRC} { Described in Section 20.10 }
-
-
-
- BEGIN
- ClrScr;
- MakeBox(1,1,80,24,GrafChars);
- WriteAt(-1,3,True,False,'** Relatively Dumb Parent Program **');
- GotoXY(10,10); Write('Press CR to shell to DOS: '); Readln;
- SaveScreen(Stash);
- Exec('C:\COMMAND.COM','');
- RestoreScreen(Stash);
- END.