<font color=blue>
;-----------Subroutine: DSPSTRING---------------------
DSPSTRING:
        push ACC        ;Saving reg. contents for
        push DPL        ;safe keeping
        push DPH        ;

        mov DPTR,#STRING1 ;***Problem area???

DSP1:                   ;Section 1: get the first string character
        clr A           
        movc a,@a+DPTR  ;Get char. from ROM code space
        inc DPTR        ;Use INC DPTR to address next string char.

        cjne a,#00h,DSP2;A = 00h? (End of string [NULL]?) If so,
        ajmp DSP3       ;then don't jump; else, go to DSP3 to RETurn
DSP2:
        push DPL        ;Save DPTR contents before LCD output subr.
        push DPH        ;
        lcall CHAROUT   ;call LCD data subroutine
        pop DPH         ;restore DPTR
        pop DPL         ;
        ajmp DSP1       ;Loop & get next string char
DSP3:
        pop DPH         ;Restore entrance val of DPTR
        pop DPL         ;
        pop ACC         ;Restore entrance value of A

        RET             ;Exit subroutine

;------DATA TABLE--------------------------------------
STRING1:                      ;first test string
        .db     "Hola Grace"    
        .db     00h             
STRING2:                      ;second test string
        .db     "Te amo Peru"   
        .db     00h
</font>