Quote:
It's best to use all lower case letters in non-quoted program text. I've run across a few assemblers that choke on mixed- or upper-case mnemonics and symbols.
Really?! Wow, that sounds rather irresponsible on the part of the whoever wrote the assembler! WDC's Liechty & Eyes programming manual always has the mnemonics in all cap.s. I wouldn't particularly be in favor of
requiring them to be in all cap.s, but I can't fathom not even
allowing them to be.
In the first major programming project I was on at work (10,000 lines of assembly, in the late 1980's), we used lower-case for labels that were only of local interest, and cap.s for most everything else. (If we had the program-structure macros back then, most of the local labels would have been unnecessary.) With 80-column-screen limitation, even the comments had a ton of abbreviations and acronyms which don't go over well in lower-case. Now with the high-res monitor (even in DOS), I don't have to be so cryptic, and there's room to write comments in a more-friendly lower-case.
The Forths I've worked with used capitals for most things, and lower-case for internals that aren't usually accessed by the programmer once they're in place in the compiling words. So for example DO and LOOP are words that execute at compile time, and one of the things they do (besides some housekeeping and checking for compile-time errors) is to compile do and loop (lower-case). do and loop execute at run time. If you use the wrong case, you'll get something different from what you intended.
The ascenders and descenders of lower-case letters are part of what our brain uses to recognize words quickly when we read prose, when our eyes stop only once for every several words as we read hundreds of words per minute or more. Our process of reading code however is much different. When we read prose, the line divisions are mostly meaningless, existing primarily because an 8.5"x11" (or smaller) book is more manageable than a ribbon a mile long. However, the line breaks in program code are
very significant, and ascenders and descenders blur those boundaries. (I know this is more an issue with higher-level languages than with assembly, since assembly only allows one instruction per line anyway.)
The numerals 0-9 are
always "capitals." Why mix them with lower-case a-f in heX nUmBErS? A few systems won't recognize them in lower-case; so keeping them in upper-case should improve portability.
I realize some of this is a matter of preference that not everyone will agree with. I do like to promote good visual factoring and neatness though, for improving the chances that code will work right the first time, and making it more maintainable.