Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.sys.ibm.pc Subject: Re: EXEC call (was: Re: shell script program for pc) Message-ID: <19318@bu-cs.BU.EDU> Date: 27 Jan 88 01:10:10 GMT References: <2638@cup.portal.com> <5706@eecae.UUCP> Reply-To: madd@bu-it.bu.edu (Jim Frost) Followup-To: comp.sys.ibm.pc Organization: Boston University Distributed Systems Group Lines: 65 In article <5706@eecae.UUCP> driscoll@eecae.UUCP (Mike Driscoll) writes: >in article <2638@cup.portal.com>, ROBERT_C_TELLEFSON@cup.portal.com says: [i'm deleting a lot of stuff on whether or not command.com has anything to do with loading .EXE programs)] > I am quoting from the IBM DOS 3.30 Technical Reference, page 6-199, >which has two notes about the functioning of the exec call: > > ... > >2. The EXEC call uses the loader portion of COMMAND.COM to perform the > loading. > >An identical note is found in the IBM DOS 3.10 Tech. Ref. > > I now quote from Ray Duncan's Advanced MS-DOS, Microsoft Press, 1986, >page 191, where the return from EXEC is discussed. The following >statement is made: > > The EXEC function will fail if: > > [First two reasons deleted] > > The transient portion of COMMAND.COM in highest RAM (which contains > the actual loader) has been destroyed and there is not enough > memory to reload it (MS-DOS 2 version only). ^^^^^^^^^^^^^^^^^^^^^ My question is, does anyone know for sure whether the loader sections moved from command.com to internal between versions 2.x and 3.x? >2. If I remove command.com from the root directory of my hard drive > and install your company's shell with the SHELL= command in > config.sys, does your shell just use EXEC without supplying > any loader support? Do you alter the COMSPEC environment > variable to point to your shell? Here is personal experience. I wrote a shell (psh, a pascal shell that acts a lot like csh) under MS-DOS 3.10. I installed it using shell= and didn't have command.com available to MS-DOS. Everything ran. I never even thought about the .EXE thing until friends told me different things wouldn't work on their PC's. A lot of people I know use DOS 2.11. I didn't think that there might be a correllation until somewhat recently so I haven't tested the possibility of version dependency. As for altering the COMSPEC environment variable, sometimes this is a good idea and sometimes it isn't. Many programs REALLY expect you to have DOS-style environment. Be wary of changing COMSPEC. You may break other programs. If you do change comspec, make SURE that your new shell accepts /c (and /C). More info on shells and compatibility with existing tools: Many MS-DOS utilites need properly formatted FCB's, so if you write a shell you better put in FCB building routines. If anyone has questions on building workable shells, ask. I'd have made my psh public but there were a few bugs I never got completely worked out, and redirection is really tough using Turbo Pascal 3.0. Now that I have 4.0 though.... jim frost madd@bu-it.bu.edu