Hi all,
I need to compare a string which is saved in Code memory location starting from 200H with another three strings which are also saved in the Code memory location this time staring from 300H.
The three strings will be separated by a comma to indicate different words and a full-stop will be used at the end of the words stream to indicate end of stream.
For now I managed to save the string to be compared and the other three strings as follows:
How can I continue comparing till I find a matching string?
Any help would be highly appreciated as I have been searching the web for quite a while but still cannot manage to make it work.
I need to compare a string which is saved in Code memory location starting from 200H with another three strings which are also saved in the Code memory location this time staring from 300H.
The three strings will be separated by a comma to indicate different words and a full-stop will be used at the end of the words stream to indicate end of stream.
For now I managed to save the string to be compared and the other three strings as follows:
Code:
ORG 0000H
MOV DPTR,#200H
CLR A
MOVC A,@A+DPTR
MOV R0,A
MOV DPTR,#300H
CLR A
MOVC A,@A+DPTR
MOV R1,A
//compare R0 to R1, compare the rest of the array characters
Here: SJMP HERE
ORG 200H
MYDATA1: DB "abc"
ORG 300H
MYDATA2: DB "ab,abc,abcd."
END
Any help would be highly appreciated as I have been searching the web for quite a while but still cannot manage to make it work.