> John Payson wrote a some comments and I wanted to add my $.02 > > >The following is a brief description of my personal taste; others' may vary. > > >Labels: > I usually put the acronym of the current subroutine first. > > SendChar > SC_Loop > > This allows you to use basic labels easily. I forgot to mention that I do this (in both .asm and .c) if the code size warrants. For small programs, it can look a little ridiculous. > >Hexadecimal numbers > > The one proper format for hex numbers is $ABCD. > > Boy, the first sentence of this paragraph is just begging to be flamed! Hey, I do enough productive posting here, I can be allowed a troll now and again, can't I? >:*3 > John, I think you have to be more tolerant of other people's preferences. I > started out with Motorola Assembly and the '$' format, so I know where > you're coming from. Actually, some time ago Andy Warren made this statement > and I couldn't honestly remember *ever* using '$'. Most of my programming > since then has been with "C" and Intel Processors. I think you'll get at > least as many (if not more) people who think that "0x0" is the "correct" > format. I'm sure that there are people out there that are lost if they > don't see in a number in the format "h'xx'". Sorry I was a bit overly strong in my statement, but every other format I've seen has problems: [1] Default radix == 16 Often requires spurious leading zero for constants whose leading digit is greater than nine. Obfuscates the distinction between length of a number and its size (e.g. in "$" format, a 16-bit number may be denoted as $ABCD or $0015; an 8-bit number can be denoted as $12 or $DE. In default-radix 16 format the first and last of these would become 0ABCD and 0DE, making them appear 20 or 12 bits long. In addition, having a default radix of 16 without punctuation can easily cause confusion between decimal and hex numbers. [2] Trailing "h" [Intel] No longer has the decimal-vs-hex ambiguity of default-16, but still has the spurious zero at the beginning. This format adds two characters to the length of the hex number (e.g. 165(dec)==0A5h [3] Unix-style (h'A5', also used by Microchip) Unambiguous, but exceptionally verbose; adds three characters to each hex number. [4] C-style (0xA5) Second-best choice. Other than default-16 and leading-$ formats, all other radix notations add at least two characters. C adds two characters without adding ambiguity, so it's the best of the non-Mot formats. [5] Leading-$ Only adds one character to a hex number; a comma-delineated list of 16 8-bit numbers can fit on an 80-character line in, e.g., a .db directive. If a number is written out to its full size (e.g. a 16-bit number using four digits) then visual observaion will immediately indicate the size of the number (byte vs word, etc.) Perhaps you can identify some way in which leading-$ format is sub-optimal?