Hi, I undestand, but I can't put togheter something of working. If you want to have a look to this code, you'll see in my comments where are my doubts.
Anyway the code doesn't compile and give errors ...
Code:
inbuff VAR BYTE[100]
x VAR BYTE
y VAR BYTE
LS0 VAR WORD
LS1 VAR WORD
Lp1:
@ LoadInbuff _ROM_CfgString, _Inbuff ; I would like to transfer the ROM string in RAM Inbuff
debug str inbuff\100,13,10
goto lp1
ASM
LoadInbuff macro Text, Dest
CHK?RP _LS0
movlw low Text ; here I load in LS0 the ROM address of the source string
movwf _LS0
movlw High Text
movwf _LS0 + 1
CHK?RP _LS1 ; here I suppose to load in LS1 the address of the destination buffer
movlw low Dest ; but I feel something is wrong
movwf _LS1
movlw High Dest
movwf _LS1 + 1
L?CALL _Lstr
endm
ENDASM
Lstr:
y=0
do
peekcode LS0, x
; --->>> what to do here to write the value x to the destination buffer ??
if x=0 then exit
y=y+1
LS0=LS0+2
loop
return
ROM_CfgString: PokeCode "This a test string",0
Bookmarks