home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / atari / 8bit / 5746 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  2.7 KB

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