-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Craig,
> I'm trying to create a label defining word which I would like to > work as follows: > > xPos yPos s" this is the labels text" label: labelName > > I tried this code: > > \ Define a label that places itself : label: ( x y addr > count --- ) create , , , , does> dup over over 3 + @i swap 2 + @i > moveCursor 1+ @i @i ; > > which at run time I want to return the addr and count of the labels > text in flash. > > The problem is, I think, that s" doesn't compile to flash outside > of a definition. Indeed. something like : label: create sliteral , , does> ... ; may work (haven't tested it) The sliteral takes the addr/len pair that is left from the s" in interpreter mode and compiles it into the flash. The does> part gets the flash address instead of the RAM addresses. Note that when using the label: word, the s" ... " and the "label:" must be on the same line, line breaks wont work, since the s" leaves addresses from the terminal input buffer and does not copy the string elsewhere. Matthias -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKFK+gACgkQ9bEHdGEMFjPsNgCg+cI99xTZB+8lE0xPwceVznYn V4MAn2QS/PYbemMkz6jjOgGLd0TL/VBs =LVxu -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel