Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Advanced Beginners Message-ID: <486.UUL1.3#5129@willett.UUCP> Date: 18 Feb 90 01:24:36 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 35 Date: 02-15-90 (08:38) Number: 2907 (Echo) To: ALL Refer#: NONE From: DAVID ALBERT Read: (N/A) Subj: FORTH MODULARITY Status: PUBLIC MESSAGE Hi everyone, I am a Modula-2 programmer who recently got into TIL languages. The reason for this was that I had to build a custom 80188 computer for a handicapped person and I needed a quick way to get it up and running interactively, so I read up on TILs and then implemented one. My TIL has been refined several times and now works rather well. I do however have several questions: First, I have seen that several implementations of Forth use a small "inner interpreter loop" using DS:SI for example as the instructioni pointer. I chose just to use CALL and RET as the entry and exit to my words. Therfore, CS:IP is my instruction pointer and word pointer. Here's the question: Why do people use the separate inner interpreter loop? It seems that the call and return are much more flexible and that I can more easily manipulate return addresses since they are just on the stack. I use BP for my parameter stack pointer. Question number 2: Since I have come from a Modula-2 background, reusable, compiled libraries are very important (to me anyway) in the course of developing good applications. Due to the interpretive nature of TILs, I seem to be having some trouble implementing libraries. I would like to allow several libraries (vocabularies) which can be manipulated independently and linked into my final application. I have read some of the solutions on late binding, but none I've seen have been satisfactory. Does anyone have any ideas, hints, etc. Do you know how anyone else does it? Any advice would be appreciated. Well, thanks for taking the time to read all of this and I look forward to your replies! See ya :-) ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'