Path: utzoo!attcan!uunet!lll-winken!lll-ncis!oodis01!uplherc!esunix!bpendlet From: bpendlet@esunix.UUCP (Bob Pendleton) Newsgroups: comp.arch Subject: Re: Shells everywhere (was Re: Cobol Data Corporation Cyber 180 ...) Message-ID: <1185@esunix.UUCP> Date: 13 Jan 89 15:46:57 GMT References: <10847@tekecs.TEK.COM> Organization: Evans & Sutherland, Salt Lake City, Utah Lines: 45 From article <10847@tekecs.TEK.COM>, by andrew@frip.gwd.tek.com (Andrew Klossner): > [] > > "It should be possible to write a shell for almost any usable > computer ..." > > A shell requires that the system supply fork() and exec(), or perhaps > start_task() (fork and exec combined) system services, or something > analogous and reasonably efficient. Well... sort of. Anyone remember Exec-8 on the Univac 1100 series? I saw a shell on an 1108 that worked by creating a file consisting of the commands needed to run a program and a command to restart the shell. The shell would then @ADD the file to its input stream and terminate so that the commands in the file would be executed. Analogous to fork() and exec()? I don't think so. Reasonably efficient? No. Did it work? Yes. Was it a shell? Yes. > > MSDOS is also a single tasking system (today, at least), but you can > write a shell for it by slipping a few tentacles into the (unprotected) > kernel. Wouldn't it just be easier to write a shell as a replacement for COMMAND.COM? A program running under MSDOS can load another program into unused memory, start it running and be awakened when the program terminates. Check out the SHELL verb under MSBasic or spawn under TurboC 2.0 for examples. This ability makes it possible to write quite a reasonable shell under MSDOS. Check out "Software Tools" by Kernighan & Plauger(SP?) for more information on how to write a shell for OSs that don't support UNIX system calls. I can't comment on Tops-10, but I'm pretty sure there were shells on Tenex and Tops-20. Bob P. -- Bob Pendleton, speaking only for myself. UUCP Address: decwrl!esunix!bpendlet or utah-cs!esunix!bpendlet Reality is what you make of it.