From: Matthias T. <mt...@we...> - 2010-09-17 17:50:28
|
Pito, > Hi, > is there any expalnation available on what these > .dw $ff03 ; > > ff02 ff05 in the header of a ams word definition means? This is the combination of the string length (the lower half) and some flag information. $ff means: no special flag is set, $00 means immediate. Strictly speaking only one bit of the $00 is the immediate flag. This "strange" behavior comes from the flash character: it does not cost anything to set a bit to 0 but you need to erase a whole page when turning it to 1. But since there are no other flags currently in use, it does not matter at all. (maybe (again: MAYBE) one other bit may be used for case insensitive dictionary search). A side effect is, that amforth can use word with up to 255 characters length. Which is absolutly theoretical since the terminal input buffer has only 80 bytes and the ram area the word WORD uses as its scratch buffer has only 100 bytes. But it makes the code more compact. > And if > important, how is the implication when writing words in asm? Thanks, standard words should use the $ff<length> information. That should fit almost all cases (immediate words are rare) Matthias |