Phil wrote: > Kmail seems to alter the layout of tabbed text so I hope the code is > readable when it arrives on the mailing list. Never put tab characters into a message. They should always be hard spaces. There is no guarantee what other people's tab stops will be set to. Most editors have an option to convert a TAB keystroke to an appropriate number of spaces. That's fine since the result is still hard spaces. > init clrf UNITS > clrf TENS > clrf HUNDREDS > > movlw 0x10 > movwf DestL You need to make sure the bank is set correctly. And no, that doesn't mean putting BSF/BCF STATUS,RPn instructions into the source code. At the very least use BANKSEL when posting code so that everyone can immediately see the banks are set correctly. For a more sophisticated approach, see my DBANKIF and related macros in STD.INS.ASPIC at http://www.embedinc.com. > movlw 0x00 > movwf DestH > movlw 0x0a > movwf SourceL > movlw 0x00 > movwf SourceH There isn't a single comment so far. There is not point continuing until that is fixed. You haven't even described the meaning of the various variables you are using. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.