Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: ANS TC Magnet for ROMability Message-ID: <2768.UUL1.3#5129@willett.pgh.pa.us> Date: 15 May 91 02:10:22 GMT Organization: (n.) to be organized. But that's not important right now. Lines: 47 Category 10, Topic 22 Message 35 Mon May 13, 1991 B.RODRIGUEZ2 [Brad] at 23:25 EDT Re. Jack's proposals for ROMability: I agree, and disagree. We've found this capability very useful in embedded systems. However, we usually need more than just two address spaces (RAM and ROM). For this reason our metacompiler includes the defining word DICTIONARY, which resembles VOCABULARY in some respects: start-adr end-adr DICTIONARY name defines a named dictionary with its own dictionary pointer, and then later invocation of 'name' makes that dictionary current. Rather than set a flag, we define a "dictionary-pointer-pointer" 'DP which holds the address of the current DP. Thus, : DP 'DP @ ; and HERE, ALLOT, and such will follow. Of course, 'DP can be a user variable, but all of the dictionary pointers should be in common RAM (shared among tasks). This scheme can conform to the RAM and ROM usage, e.g., HEX 0 8000 DICTIONARY ROM 8000 FFFF DICTIONARY RAM \ or any other address limits but is much more powerful. It is very nice for supporting paged memory systems. We're even working on parallel compilation of separate programs (where two CPUs need to know each other's symbol tables) using this technique. There are refinements for extended addressing and physically separate memory spaces. Jack's right...this concept is VERY useful, and good Forth. But I hope this example shows that it's too soon to move RAM and ROM into the "normative" status. - Brad Brad Rodriguez | brad%candice@maccs.uucp (God willing) B.RODRIGUEZ2 on GEnie | brad%candice@maccs.dcss.mcmaster.ca "Shoes for industry!" | bradford@maccs.dcss.mcmaster.ca (archaic) ----- This message came from GEnie via willett. You *cannot* reply to the author using e-mail. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, etc.). Report problems to: dwp@willett.pgh.pa.us _or_ uunet!willett!dwp