Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma From: toma@tekgvs.LABS.TEK.COM (Tom Almy) Newsgroups: comp.lang.forth Subject: Re: Forth development environments Message-ID: <6395@tekgvs.LABS.TEK.COM> Date: 20 Nov 89 20:19:24 GMT References: <7010@pt.cs.cmu.edu> Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy) Organization: Tektronix, Inc., Beaverton, OR. Lines: 37 In article <7010@pt.cs.cmu.edu> koopman@a.gp.cs.cmu.edu (Philip Koopman) writes: >My primary issue of concern at this point is "where >does the outer interpreter live" for software development? >The context is support for minimal embedded systems, which >don't have their own full keyboard, CRT, or disk drive. >1) Outer interpreter lives on the development target >2) Outer interpreter lives on the development host. >3) Outer interpreter lives on the development host, but > all efforts are made to make it appear to live on the target Well my batch Forth compiler, CFORTH, is almost a case 3. - Colon definitions (which compile into machine code), code words, and all data are located in the target image. - Headers do not go into the target image, which prohibits case 1 operation. - During compilation, the interpreter runs, and you get roughly 83 Standard operation: tick works, @ and ! access the target image memory. You cannot execute colon definitons and code words in the target, but can create colon definitions that execute in the host. - DOES> and ;CODE are supported. The portion of the definition before the DOES> or ;CODE compiles into the host image (defining words can't be executed at "runtime" anyway), and the portion afterwards compiles into the target image. An attempt to execute a defined word returns only the address of its data (much like ticking would do). - The scheme runs quite cleanly, and with seemingly little confusion. My favorite "trick" is to write the Byte (sieve) benchmark so that it runs at compile time and prints out the answer at run time. Blazingly fast execution! Tom Almy toma@tekgvs.labs.tek.com Standard Disclaimers Apply -- CFORTH is a commercial product.