On Jun 14, 2008, at 12:42 PM, Olin Lathrop wrote: >> Is there a reference available that spells this out >> clearly enough that a studious beginner can understand it >> well and get it right? > > Yes, the MPASM/MPLIB/MPLINK manual. In this case the chapter > "Directive > Language". All the directives, including #define, CBLOCK, and RES are > individually described in detail. That's where I learned it from. While I don't doubt that the individual directives are "described in detail" in the MPASM manual, I *DO* doubt that the descriptions are sufficient for a beginner to really understand the differences between constants, string substitutions, macros, variables, reserved storage, and literals (and who knows what else.) That sort of understanding generally has to come from having dealt with several different languages and different assemblers, struggling with the differences in concepts between C's "#define", "const", and "enum" vs Pascal's "const" and "set." A compiler class MIGHT help, but they tend to focus on parsing whichever style of language is currently popular... It doesn't help that C's capabilities in this area are primitive, or that mpasm combines typical assembler syntax with some C capabilities thrown in... I suppose that a write-up describing the basic principles would be possible (with examples from various languages!) I haven't seen one; I'm not even sure what it would be called... BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist