Could anyone tell me how to compare two strings in assembly language, I`ve written the followign, but it does not seem to work.
assume cs:code, ds:data
data seg
I had the same problem when I was writing asm in school, years ago. The problem I encountered was that I wanted to compare the word "exit" with a user entry. If they typed "exit", the application quit. If they typed anything else, then a message appeared telling them there was an erroneous entry.
The way I solved the issue was to compare the strings character-by-character, until the characters no longer matched, or vice-versa.
This also might be of some use. Here are some code examples relating to string comparison in assembly language: http://www.daniweb.com/software-development/assembly/threads/58667/assembly-language-comparing-strings
You might also want to look at this article relating to regular expressions (regex) in assembly language: Regular Expressions and Assembly