From: Matthias T. <mt...@we...> - 2010-08-09 18:11:44
|
Leon, > Have the word definitions available at > http://amforth.sourceforge.net/words/ been updated to reflect this > change, or are they using the old definitions? They usually reflect the bleeding edge of development but not every subversion commit. Currently it shows the brand new implementation of variable based upon constant... > That makes sense to me, but I'm still interested in definition amforth uses: > > http://amforth.sourceforge.net/words/XT_VARIABLE.html > > Why "(CREATE) COMPILE COMPILE" instead of CREATE? What is (literal) > doing in front of the 2? You'd better read the sources, since the html versions are somewhat broken, the script generating the files tries to make forth code from the assembly sources, with mixed success however.. > Shouldn't sticking (literal) in the The sequence (literal) <number> is a 1:1 translation of a compiled number. Think of it as the number only. The (create) word is a factor from the defining words that makes only a vocabulary entry without an XT or data field. The XT is filled afterwardds by words like : (with the DO_COLON address) or variable/constant (with PFA_DOVARIABLE) etc. A RAM based dictionary would not need to do so, but a flash based one will honor the not necessairy flash re-write that is needed while overwriting the XT. Matthias |