No, but this might work for you..
Code:' print message a GOSUB messagea ' print messageb GOSUB messageb etc... messagea: Lookup y,["Message A"],ascii GOSUB LCD_THINGY Return messageb: Lookup y,["Message B"],ascii GOSUB LCD_THINGY Return
No, but this might work for you..
Code:' print message a GOSUB messagea ' print messageb GOSUB messageb etc... messagea: Lookup y,["Message A"],ascii GOSUB LCD_THINGY Return messageb: Lookup y,["Message B"],ascii GOSUB LCD_THINGY Return
Dave
Always wear safety glasses while programming.
Hi Dave,
Thanks again for your help.
I have considered your idea but I can't figure out how to implement it because the GOSUB LCD_THINGY routine makes 64 lookups of the table in question.
TR
Might be a good time to post your code as it is right now, I am sure there is something I am missing.
From the manual :
So as long as the look up table block does not call a sub of a sub then you shoulde OK with 64 GOSUBS to the lookup block and back.An unlimited number of subroutines may be used in a program. Subroutines may also be nested. In other words, it is possible for a subroutine to call another subroutine. Such subroutine nesting should be restricted to no more than four levels deep (12 levels for 17Cxxx and 27 levels for 18Cxxx)
Dave
Always wear safety glasses while programming.
Hi Terd
This is how I do it when I have a number of messages to either print or put out to a 7 segment display.
This is not adapted to your requirement, but, I think you can do that yourself.Code:' Thank DT for this Macro 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 Address var word gr[0] var byte ' Examples of how to put your strings in memory prn_SetDate: PokeCode "Date changed",0 prn_SetTime: PokeCode "Time changed",0 prn_LogPrinted: PokeCode "Log printed",0 ' And this is how to use it @ GetAddress _prn_SetDate, _Address gosub Prt_puts ' This is my routine to put the string to Printer. ' You could change this to your LCDout routine. return ' And this is My Prt_puts function ' Print an ASCIIZ string ' Input - Address points to the string Prt_puts: repeat peekcode Address, gr[0] ' read a byte to GR[0] (general register 0) if gr[0] then ' if end of message (0) not found, gosub Prt_putc ' print this character Address = Address+1 ' advance to the next position of input string endif until gr[0]=0 ' go back if the message end is found return
Bookmarks