Here's a slight modification of the old Embedded String thread...
Code:
lcdpx VAR byte
lcdpy VAR BYTE
Addr VAR WORD
ASM
PrintStr macro x, y, Str
local TheString, OverStr
goto OverStr
TheString
data Str, 0
OverStr
MOVE?CB x, _lcdpx
MOVE?CB y, _lcdpy
MOVE?CW TheString, _Addr
L?CALL _StringOut
endm
ENDASM
Char VAR lcdchardata[0]
StringOut:
Readcode Addr, Char ' Get a character
if Char = 0 then StringDone ' Look for Null char, Stop if found
gosub puttext
Addr = Addr + 1 ' Point to next character
lcdpx = lcdpx + 1
goto StringOut ' Continue with rest of the string
StringDone:
return
;-----------------------------------------------------------------------------
Then you can do this...
Code:
@ PrintStr 0,0, "RESET ELM327..."
@ PrintStr 0,1, "Hello World!"
HTH,
Bookmarks