Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!mlb.semi.harris.com!forth.mlb.semi.harris.com!rvn From: rvn@forth.mlb.semi.harris.com (Rick VanNorman) Newsgroups: comp.lang.forth Subject: Re: would it still be Forth? (A thought experiment) Message-ID: <1990Sep26.172902.13630@mlb.semi.harris.com> Date: 26 Sep 90 17:29:02 GMT References: <1990Sep26.084456.8790@idacom.uucp> Sender: news@mlb.semi.harris.com Organization: Harris Semiconductor, Melbourne FL Lines: 38 Nntp-Posting-Host: forth.mlb.semi.harris.com in <1990Sep26.084456.8790@idacom.uucp>, rob@idacom.uucp (Rob Chapman) writes: > I've been toying with the idea of doing this with DOS and botForth on the > PC. The input stream is interpreted by looking up parsed strings in the > dictionary. If it doesn't exist, try to convert it to a number. Failing > this, pass the rest of the input stream on to DOS to be processed as a DOS > command. The prompt could even be C:>. As a matter of fact, if you only > typed in DOS commands, you wouldn't realize that there was a Forth running! > (When was the last you checked your command line?) I tried this for about 2 days last winter (in Florida? ya gotta be kidding!) and decided that it was not going to be ok without redefining some of the Forth vocabulary -- there were too many overlaps into DOS (such as TYPE and ERASE) to feel comfortable. I did this by using an extension in the interpreter that, upon failing number conversion, would try to execute the remainder of the input line as a DOS command. It worked pretty well, but I decided not to use it. Also, the terminal environment that I use for my target-resident Forth for the RTX 2000 series maps some common DOS commands. So, while I am executing on the RTX (using the PC for a "smart" terminal/host) I can type "DIR" or "CD \something" or any of the commands that I defined. Imagine this interface with full DOS access for anything it doesn't recognize!! You get to run a Forth engine at full speed, ignoring the stupid DOS environment until you need it for something, and that something would be automatically routed to DOS. I don't know -- I think I'll keep the DOS commands seperate but equal, and let Forth complain when a word isn't defined. Rick VanNorman Staff Engineer, Software Development RTX Marketing Harris Semiconductor Melbourne, Florida, USA All opinions expressed by me, real or otherwise, are my own.