Dwayne Reid wrote: > I posted a set of routines to the list back in March: HEXASCII (hex to > Ascii), ASCIIHEX (ascii to hex) and UPCASE. I dug them out when I read > Eric's challange and like Scott, I'll repost my version of toascii without > comments. > skpndc Oh yeah! The 'used-once-in-a-blue-moon-digit-carry'. > I'm looking forward to seeing Eric's UPCASE routine: mine is 10 instructions > and 11 cycles including the return. Here's the 6 instruction/7 cycle 'toupper' toupper ADDLW -('z'+1) ADDLW 'z'-'a'+1 SKPNC ADDLW 'A'-'a' ADDLW 'a' RETURN It's probably clearer now. The hint has been all but exposed. Roll-over arithmetic is the key. BTW. Does anyone have a good explanation why ADDLW -('z'+1) ==> -('z'+1) evaluates correctly to 0x85 assembles differently than ADDLW -'z'-1 ==> -'z'-1 evaluates incorrectly to 0x87 (I'm using the pre-historic version 3.12.00 of MPLAB) Scott -- "The problem with television is not the resolution." Hugh. F. Frohbach