Path: utzoo!attcan!uunet!lll-winken!lll-lcc!well!jax From: jax@well.UUCP (Jack J. Woehr) Newsgroups: comp.lang.forth Subject: Re: FORTH and memory Summary: It's like Nick said, only more so! Keywords: DO, LOOP, interpreter, inner, JSR, Amiga, Super8, Novix Message-ID: <6706@well.UUCP> Date: 3 Aug 88 05:56:48 GMT References: <8807211846.AA27919@jade.berkeley.edu> <9428@dartvax.Dartmouth.EDU> <2353@pt.cs.cmu.edu> <1530@crete.cs.glasgow.ac.uk> <132@kolvi.hut.fi> <17597@glacier.STANFORD.EDU> <2529@pt.cs.cmu.edu> Reply-To: jax@well.UUCP (Jack J. Woehr) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 28 In article <2529@pt.cs.cmu.edu> ns@cat.cmu.edu (Nicholas Spies) writes: >Mach2 on a Mac SE does 10000 0 do loop in 1/30 sec (2 ticks)--30 times faster. > >I think it's hard to generalize about interpreters, because there is more than >one way they are implemented. For instance, some Forths store the top couple >of items of the parameter stack in registers, instead of memory. Some (like >Mach2) have a seperate stack for DO..LOOP use (instead of using the 68000 >stack). Some Forths compile (in the Forth sense) a pointer to a routine to >allow the inner (or address) interpreter to thread Forth words, while other >Forths such as Mach2 compile Forth words to be executed as 68000 subroutines, >which are executed by JSR. > >Several Forths permit colon definitions to be compiled as in-line code, >avoiding all threading during execution (but usually using more space). The >ones I know about are HSForth and PCForth (both for PCs) and Mach2. To which we might add, direct threading, as in some schemes proposed in the seventies for the PDP-11 &c.; And that JForth for the Amiga is another JSR-Threaded Forth; and that other schemes include making ENTER ( NEST) EXIT ( UNNEST) and NEXT microcode ( Zilog Super8) and the inner-intepreterless Novix and Johns Hopkins chips, which set a bit in instruction ( or bits, in the case of JH) to indicate code|jump. +_+_+_+_+_+============================================================== jack woehr "Pronounced as in `Armed Conflict'." jax@well "Host of the WELL Forth Conference." jax@chariot "I live in Colorado." JAX on GEnie "Would you buy a Single Board Computer from this man?"