I am working with Visual C++ Professional 6.0. I am looking for a quick subroutine for Comparing to strings and finding out if the substring is found inside the Main String and then return the value.

Now I am not fully familiar with Intel ASM if somebdoy could kind of help me work through this. I understand the basics OF ASM as I created my own Assembler and taught myself ASM based on a 2,045 byte program on the TRS-80.. Now that was for the Z-80 but basically the ideas are the same you just deal with more registers and bigger registers. .We Had a whopping 8 bit registers :P
Posted on 2002-02-20 13:01:25 by Volcano_88101
So To Start this off. The Memory Pointer to the Strings are passed along
int FindSubString(char *StringToSearch , char *SubString)
{
Now with the C++ Version i had to deal with String Length but if i use ASM I shouldnt have to because ican compare it to 0x00

So I need to get ahold of the Memory Pointers... I found one of them but was unable to find them.. would i be able to do a pop and get those back?

}
Posted on 2002-02-20 13:01:42 by Volcano_88101
If you want something extremely fast, please email me and we can discuss payment into my paypal account for programming services. Thank you.
Posted on 2002-02-20 13:19:21 by bitRAKE
I found one of them but was unable to find them..
Huh?? Say what???

What bitRake is telling you is: by all means learn asm, and post questions here if you have specific problems, but do not post requests here for complete functions etc. to be written for you. Many people who give their time in this forum are professionals, and charge money for this sort of thing. Even if you were a personal friend of the developer, you would still get charged, but it is more likely that the developer would accept beer and stuff as currency.

What you are wanting is a fairly simple thing to achieve. First i would advise that you check out the algorithms section of this board, there will be plenty of info there on substring searches. Or, pick up some tutorials on MASM and learn it. Then you will find that if you write a proc which is passed parameters, then MASM sets up a stack frame for you and you can treat those passed parameters as local variables. It is slightly more hard-core under TASM, you have to either pop the values off the stack, or set up your own stack frame and use indexing to access the parameters. How are values passed back the calling function? You will have to read the manual or tutorial :)
Posted on 2002-02-20 17:29:51 by sluggy
Yeah I found something that looked pretty close to what i might be doing with some modifications.. I will stick with MFC for now i guess since Time is of the essense but ty anyyways :)
Posted on 2002-02-21 13:54:49 by Volcano_88101
Darn, I was hoping for a little spare cash - want to upgrade my computer... :grin:

Post your results in the Algorithm forum and let us pick it apart! :)
Posted on 2002-02-21 14:00:12 by bitRAKE
one word about self-made lstrlen, lstrcmp or lstrcmpi functions:

use them only for lower 7 bit ASCII purposes! Its really not trivial to work with international strings, (f.e. german umlauts)
Posted on 2002-02-22 06:25:11 by beaster