Pygmy includes a meta-compiler. It is easy to use. To gen (generate) the nucleus, edit the source code in the file PYGMY.SCR to include your changes, use UNIT to make screen numbers relative to the beginning of this file, and type 1 LOAD This will create a new version of Pygmy and save it to disk. Be sure to edit the file name you want it saved as. Exit to DOS with BYE and bring up the new version you just created. This version does not yet have the editor or assembler etc. I usually create the final version in two more steps. First I load the editor and default file names and save it. Then I load the assembler and save it. Since the nucleus you just created has no default files open,you have to open at least one from the keyboard, by typing something like 0 OPEN PYGMY.SCR Hopefully in that file you will have a screen with the rest of the default files you want, so you can just load that screen rather than typing in additional OPEN commands. Here's an example of how I create a final version, assuming I just created a nucleus named A1.COM in subdir PYGMY: C:\PYGMY\>A1 0 OPEN PYGMY.SCR 77 LOAD ( open other files ) 80 LOAD ( load screen for the editor) SAVE A2.COM ( this might be included in editor screens) 1 UNIT ( assuming assembler code is in 2nd file ) 1 LOAD ( load screen for assembler) SAVE A3.COM ( again, might be included in assembler file) It is very easy, so don't put off trying it! Here is how it works. H' holds the target's dictionary pointer (& H holds the host's). Following H' is the relocation factor used for the target code. The curly braces switch between the target & host spaces, so that the regular host facilities, such as , HERE -FIND etc can be used for both purposes. The host does have to have some special meta-compiler words. When we are redefining a host word that we might need the original of, the original is renamed, so we will still have access to it under the synonym ( e.g. : :' : ; ). There are two ghost vocabularies used for the target: FORTH & COMPILER and the host's are renamed as FORTH' & COMPILER'. This is the secret that keeps everythingstraight. When interpretting, words are looked up and executed (as is normal) from the FORTH' vocabulary. When compiling a colon definition, COMPILER' (host's) is searched first. If found the word is executed immediately. If not found, FORTH (target's) is searched. If found, the word is compiled into the new definition. If not found, it is converted to a number (or an error) and compiled as a literal into the new definition. So, when meta-compiling, target COMPILER words are never executed, leaving the host's free to operate. When not compiling, target FORTH words are never executed, leaving our regular host system free to operate. \ is redefined so when meta-compiling, the word is looked up in the target's COMPILER vocabulary and compiled into the new definition. All of this means that you do not have to forget any of the target words. So what changes might you make? Changing the constant TMAX-FILES will let you specify just how many files to allow open at the same time. Changing NB lets you change the number of file buffers that will be used. Currently NB is 1, which allows 2 buffers. Note that the number of buffers must be a power of two (and greater than 1), so acceptable values for NB are 1, 3, 7, 15, etc. Suit yourself. So far I haven't had any trouble using just two. If you change NB, you must also change ADDRESS. You can eliminate the excess and useless words that I've included but that you see no need for. (Just don't eliminate any that are used in the definitions of other words that you do want to include!) You can pick which of the two FORGETs you want to use (see SUPPL.SCR). For target applications, you can let the metacompiler do all of your CODE (assembly language) words so that you do not need to inlcude the assembler in the final target application. (You might also eliminate the editor from the final application if it isn't needed, but that's not affected by the meta-compiler.) Currently the meta-compiler does not allow headless code. If you want to streamline the dictionary, you can unlink the auxilary words that won't need to be searched for in the final application by using HIDE ( see SUPPL.SCR). The heads won't show with WORDS and they won't be in the links to slow down the dictionary searches, but they'll still be taking up space. If you change the BOOT code, you may need to change the patch on screen 62 where the address of reset is patched into BOOT. QUIT is used in 3 places prior to QUIT being defined. These patches are on screen 61. If you modify the words abort" or ?SCROLL you may need to change the addresses for the patches. If you are target compiling an application and want it to execute your code automatically (rather than coming up in Forth)include the word RESET your highest level word and patch your word into reset (the way scr 74 patches RESET into reset). The source code in PYGMY.SCR is set up for a monochrome monitor. If you have a color monitor instead, there are two changes you must make. See the 14th & 15th lines of screen 74. For monochrome systems, VID is initialized to B000 and CRTC is initialized to 03B4. For color systems these should be initialized to B800 and 03D4. Right now PYGMY.COM works on monochrome systems and I hope that PYGMYC.COM works on color & Compaq systems (with the above changes to VID & CRTC). Please let me know how it works on your system.