I've used the following method in assembly language programs to reduce LCD string "overhead" by pulling the string address from the stack but I'm not sure how you might implement it in PBP (or if it might save memory compared to how you're doin' it now).
Food for thought.  Regards, Mike
	Code:
	;
;  example macro usage
;
        PutStr  "Azimuth:\n\r "
        PutStr  "Elevation:\n\r"
;
 
	Code:
	;
;  PutStr macro
;
PutStr  macro   str             ; print in-line string
        call    PutString       ;
        db      str,0
        ENDM
;
 
	Code:
	;******************************************************************
;
;  PutString - print in-line string via Stack and TBLPTR
;
;  string must be terminated with a 00 byte and does not need
;  to be word aligned
;
PutString
        movff   TOSL,TBLPTRL    ; copy return address into TBLPTR
        movff   TOSH,TBLPTRH    ;
        clrf	TBLPTRU		; assume PIC with < 64-KB
PutNext
        tblrd   *+              ; get in-line string character
        movf    TABLAT,W        ; last character (00)?
        bz      PutExit         ; yes, exit, else
        rcall   PutLCD          ; print character to LCD
        bra     PutNext         ; and do another
PutExit
        btfsc   TBLPTRL,0       ; odd address?
        tblrd   *+              ; yes, make it even (fix PC)
        movf    TBLPTRH,W       ; setup new return address
        movwf   TOSH            ; 
        movf    TBLPTRL,W       ;
        movwf   TOSL            ;
        return                  ;
 
				
			
Bookmarks