home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!rutgers!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!csus.edu!netcom.com!jimlynch
- From: jimlynch@netcom.com (Jim Lynch)
- Newsgroups: comp.sys.atari.8bit
- Subject: Re: FORTH-83 for Atari 8-bit; anyone interested?
- Message-ID: <1992Dec31.133045.20708@netcom.com>
- Date: 31 Dec 92 13:30:45 GMT
- References: <1992Dec28.124555.2212@netcom.com> <1992Dec29.143533.1824@cs.tu-berlin.de> <1992Dec30.035608.22678@mtu.edu>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- Lines: 39
-
- Forth as it exists today is a combination of a threaded interpretive internal
- structure with reverse polish notation.
-
- It's a whiz kid at aiding the rapid development of just about anything with
- its strength being things like device drivers (the SparcStation boot rom is
- a Forth interpreter). Since it's a structured language, however, it is suited
- for more general purposes as well.
-
- Its RPN version of 1 * 2 + 3 looks like 1 2 * 3 +; if(condition) then a else b
- looks like: condition if a else b then. The reason for the basackward appearance
- is because Forth uses a stack for all parameter passing. The would-be Forther
- would find him/herself immersed in dealing with the stack. If you plan on
- learning assembly language, you must deal with its return stack (since being
- careless when dealing with it almost always results in a crash). In addition,
- most Forth systems have an assembler (which is also reverse polish: LDA #4
- looks like 4 # LDA,)
-
- Forth also has a dictionary structure which holds forth 'words', the operations
- of Forth. You can add to the dictionary and use your new word immediately; it's
- now part of the language. The definitions of most Forth words are sequences of
- Forth words; in fact, 80-90% of most Forth systems is written in Forth itself.
-
- Since you can make a new word and test it immediately at the keyboard,
- development is quick. Forth isn't like most languages; definitely doesn't
- look like most anything normal and Forth has been spoken of as the most
- unreadible languages in the universe, surpassing even C! However, like
- any other expression, the writer has a chance to write comments so he can
- remember what he did 6 months ago (if not just yesterday) and do so in a
- readible style.
-
- Forth takes about a month of fairly solid hacking to learn enough of it
- to be truely useful. Once at that stage, you can learn the internals of
- Forth, concentrating perhaps on how the if, else and then words work or
- maybe on its interface to the machine.
-
- In summary, Forth can be a learning experience to make the transition
- to assembly programming, a desk calculator (mostly integers), a prototyping
- environment (where you can see what your - say - game - will eventually
- look like) or a serious development language.
-