Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Any chess programs using Forth?

Author: Dan Andersson

Date: 09:16:12 09/20/01

Go up one level in this thread


Debugging in Forth is really simple, if done correctly. Much testing can be done
immediatelly and interactively. A word (a.k.a. forth function) should average at
about seven other words. Long functions should be factored into shorter ones,
the compiler will make the overhead negible. Each word has an associated stack
comment, specifying exactly the stack effects. A complex function can be tested
interactively or in batch mode by creating a test driver feeding test data and
examining the stack contents afterwards. As for the percieved difficulty in
compiling C code to a stack architecture, there are no such problems. The
difficulty that exist is compiling Forth to register machines, especially
register starved architectures. The now common Harvard CPU-architectures are a
bother also, since self modifying code and run time compilations are possible.
Thus time wasting necessitating cashe syncronisation schemes.

MvH Dan Andersson



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.