Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: Was just wondering when people started using C to write forth languages and not assembly? Date: Wed, 18 May 2016 20:38:18 -0400 Organization: Aioe.org NNTP Server Lines: 40 Message-ID: <20160518203818.4fd0690d@_> References: <622db793-14c4-48e5-a732-686c0b759db5@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Claws Mail 3.13.1 (GTK+ 2.24.13; x86_64-unknown-linux-gnu) Xref: csiph.com comp.lang.forth:47286 On Wed, 18 May 2016 11:31:46 -0700 (PDT) Darin Murphy wrote: > One thing that had repeatedly popped up was that forth and C where > not very [compatible] with each other. Versions of Unix-Forth for PDP-11 and VAX were posted to net.sources in 1984 and are coded in C and Forth. So, that would be just a few years after the release of the first fig-Forth in 1980 for the 6502 which was coded in assembly. As to why C was used here, my personal guess would be two-fold. The author probably knew how to code in C on mainframes. Assembly on mainframes is generally not that well known. I.e., there is a preference for programming in high-level languages on mainframes instead of assembly. Most implementations of Forth in C use a switch() statement instead of implementing an actual interpreter using threaded code (ITC, DTC). > From what I've read about Mr. Moores forth, eforth, etc, was that > only a small group of primatives need be written and forth would > evolve from those primatives. Yes, the C.H. Ting variant of Bill Muench's eForth was coded in Forth using only 36 primitives. The remainder is in high-level Forth. This was considered to be the first Forth to use this method. Before that, most Forths were coded entirely in assembly. Charles Moore has stated that he considered 60 to 63 primitives to be the essence of Forth, but I've never found out as to which. Since the C.H. Ting eForth, there have been many other Forths using this method, and they use from 13 to 72 primitives. Ms. Rather prefers the term low-level words instead of primitives, since the other words will be coded in high-level Forth words when using this method to implement Forth. Rod Pemberton