> Yes, strings are a pain on the PIC. You could also get fancy and have > predefined constant offsets into a string table, i.e. > > StrTable > retw "String1",0 > retw "Long String",0 > retw "3rd string",0 There are some other tricks that can be handy for such things, e.g. if there were an "addwf PC" at StrTable above, you could use something like: DumpStringN: movwf N ; Procedure to dump Nth string in above table [1=1st] clrf Index DumpLoop: movf Index,w incf Index,f call StrTable iorlw 0 ; Check if W is zero btfss Z goto FindLoop decfsz N goto FindLoop DumpLoop: movf Index,w incf Index,f call StrTable iorlw 0 ; Check if W is zero btfsc Z retlw 0 call PrintChar goto DumpLoop A bit of a hack, but I've found similar techniques to be sometimes useful with the CCS compiler which does not include any really good methods for doing the above. BTW, another useful trick when writing code that should be equivalent to printf("Answer=%3d Result=%05D", answer, result); is to code it like this [more or less]; note that if there weren't very many printfs, it might be better to put more of the work in the "format" section and less in the library section. Note that "Format" is designed to be used as a string in a string-print procedure. Format: db "Answer=" movlw answer call IntPConvert goto BGetHund goto BGetTens goto GetOnes db " Result=" call IntPConvert goto GetTenK goto GenThou goto GetHund goto GetTens goto GetOnes retlw 0 IntPConvert: bsf blankflag movwf FSR movf IND,w movwf TempL incf IND movf IND,w movwf TempH goto Convert ; My wonderful bin->dec convert routine BGetThou: movf Thou,w goto GetWBlank BGetHund: movf Hund,w goto GetWBlank BGetTens: movf Tens,w GetWBlank: btfss Z bcf BlankFlag btfsc BlankFlag movlw $F0 addlw 48 return GetTenK: movf TenK,w goto GetDigit GetThou: movf Thou,w goto GetDigit GetHund: movf Hund,w goto GetDigit GetTens: movf Tens,w goto GetDigit GetOnes: movf Ones,w GetDigit: addlw 48 return