>FINALLY I realized that the problem was that the default base in MPASM >isn't decimal. A few dozen d'...' later (including on the argument to >the macro) and now it gets the right answer. > >Wow, that sucked. Don't let it happen to you. And the conclusion is ??? always specify the radix of each variable. Never rely on the default. The stories I have heard of Fortran programmers who ran into this because someone changed the defaults somewhere are myriad. I have developed the habit of always putting a decimal point on a decimal variable in PIC assembler (this is the alternative to d'...') to ensure that it gets properly converted, even though I use Olin's environment where he sets the default to decimal. The effort involved in using 0x... or .ddd is absolutely minimal, automatically 'comments' your code so others understand what you expect, and make the default radix irrelevant. here endth today's lesson :)))) -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body