I don't know what pic you are using, but here is a stab at one technique to help you out. It worked on my 18F series pic just fine.
But fisrt look at Darrel Taylors technique on how to store and retrieve strings in Code Space. This will help you understand what I did. If you are using a 16F, you will need to read this to modify the code.
Not saying this is the most efficient method, but it's what I came up with at the end of a long day on the quick.
HTH,Code:Month_addr var word CntMonthletters var byte MonthOut var byte MonthOffset var byte MonthString: @ da "January " @ da "February " @ da "March " @ da "April " @ da "May " @ da "June " @ da "July " @ da "August " @ da "September" @ da "October " @ da "November " @ da "December " '------------GetAddress Macro - Location insensitive ------------------------- ASM GetAddress macro Label, Wout ; Returns the Address of a Label as a Word CHK?RP Wout movlw low Label movwf Wout movlw High Label movwf Wout + 1 endm ENDASM @ GetAddress _MonthString, _Month_addr ' Get address of String '----------------------------------------------------------------------------- ' ' ' Whatever code for main program ' ' ' ' 'Start your printout here after any other code Printit: SerOut2 SO,16468,["TIME: ",HEX2 hh,":",HEX2 mm,":",HEX2 ss,10,13] Pause 500 SerOut2 SO,16468,[HEX2 day," "] 'Printout the stored Month Strings monthoffset = ((mo & %00001111) + (10 * (mo >> 4)) - 1) * 10 for CntMonthletters = 0 to 8 Readcode (Month_addr + monthoffset + CntMonthletters), monthout IF monthout = " " THEN GOTO QuitMonthPrint SerOut2 SO,16468, [monthout] next CntMonthletters QuitMonthPrint: SerOut2 SO,16468,[" 20",HEX2 yr,13] End Select Pause 1000 SerOut2 SO,16468,[" momth= ",HEX2 mo,13,12]
Steve





Bookmarks