Path: csiph.com!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Sorta interesting ... to me at least ... :) Date: Wed, 07 Oct 2015 02:54:18 -0400 Organization: Aioe.org NNTP Server Lines: 40 Message-ID: References: <1f50230f-bc7c-4a69-b054-756c8be44e1f@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:42416 On Sat, 03 Oct 2015 16:47:58 -0400, Chris Curl wrote: > So I wrote this little C++ program to emulate my idea of what I would like > a Forth VM to be able to do. That initializes itself with about 20 words > as the basis of my dictionary. I then used that to read and interpret a > bootstrap file using the 20 base words that filled in the rest of my > dictionary. > > I'm sure this is probably a pretty standard way of implementing a Forth > system. Yawn ... I and others haved coded Forth partly or completely in other languages, such as C. Most C/C++ implementations use a switch() statement to select code for the low-level words or "primitives". I follow the way an interpreted fig-Forth Forth works in assembly. Lars Brinkhoff has lbForth which works more like an interpreted Forth too. The author of it replied to you in another thread. I would've thought he'd be interested. > The fun part of it is that I have now written a set of words to disassemble > the system in terms of my VM's machine language, and another set of words > that does a dis-assembly as well, except that this other word set spits > out x86 assembly code that does the same thing. I can compile that directly > using MASM32 without having to make any changes > > It is not complete yet, but when it is, I'll be stoked. That's convenient. Some would prefer NASM though. IIRC, the old FPC and TCOM Forths by Tom Zimmer for MS-DOS produced binaries. Modern Forths do as well. Rod Pemberton -- Just how many texting and calendar apps does humanity need? Just how many food articles from neurotic millenials do we need?