[comp.sys.ibm.pc] Shell to DOS

erhoogerbeet@watmath.UUCP (04/22/87)

Is there anyone out there (who *does* know what they are doing) that knows
how to do a shell to DOS from Turbo Pascal?

I have a vague idea that it involves interupts and system calls to DOS, 
but I am really lost.

I am trying to make a software package that allows you to go to DOS and
exit back again.

Any constructive comments welcome!


------ ---------               ------------------------------------------
erhoogerbeet@watmath.uucp                recursive adj. re-kur-siv 
Edwin (Deepthot)                           see recursive.  
Hoogerbeets                                (from the Latin recurrere -
					    to come back, return)

cjdb@sphinx.uchicago.edu (Charles Blair) (04/25/87)

In article <12937@watmath.UUCP> erhoogerbeet@watmath.UUCP (Edwin (Deepthot)) writes:
>Is there anyone out there (who *does* know what they are doing) that knows
>how to do a shell to DOS from Turbo Pascal?
>
>I have a vague idea that it involves interupts and system calls to DOS, 
>but I am really lost.
>
>I am trying to make a software package that allows you to go to DOS and
>exit back again.
>
>Any constructive comments welcome!
>

The basic idea is (1) release memory your program doesn't need (I'd
recommend you do that once at startup) (2) perform the EXEC function
call. Ray Duncan's _Advanced MSDOS_ (Microsoft Press, 1986) devotes a
whole chapter to this, with an example in C, and the same example in
assembler. I don't know how you would do it in Turbo Pascal, but
Duncan describes what you gotta do, one way or another. All I'll say
here is that even with those examples, it's still tricky business.
(Norton's Programmers Guide ... also talks about it, but Duncan is
much more explicit.)

-- 
uucp:	  ..!ihnp4!gargoyle!sphinx!cjdb		Charles Blair
Bitnet:	  lib.cb@uchicago.bitnet		The University of Chicago
Internet: cjdb@sphinx.uchicago.edu		Computation Center