Are there any tutorials to learn about string manipulation that are easy to understand??

Im really having a hard time grasping how strings work in assembly language. If someone knows of one i would appreciate any responses to this thread that you may have.

Thank you,

HeXeN
Posted on 2002-11-11 14:37:08 by HeXeN
HeXen:
When you write in asm you must divorce youself from the methods of high level languages.
The string concept of high level languages boils down to a simple sequence of consequtive bytes.
You use the same instuctions for these sequences as for any other type of data:
eg: this converts a string to lower case(this is in masm syntax).


tolower proc pBuffer:dword,nBytes:dword
mov edx,nBytes ;edx keeps track of the number of bytes processed
mov eax,pBuffer ;eax holds the start of the buffer
to_lower:
cmp byte ptr[eax+edx-1],"A" ;test for capiatl letter
jb no_conv ;jmp if less than "A"(41H)
cmp byte ptr[eax+edx-1],"Z" ;test for capiatl letter
ja no_conv ;jmp if less than "Z"(5AH)
add byte ptr[eax+edx-1],20H ;did not jump so convert to small letter
no_conv:
dec edx ;string is being processed backward
jnz to_lower ;have we reached zero? no then process next byte
ret
tolower endp


in the masm32 package there are souce code to various byte sequence(string) functions. Some are only a few(<20) lines of code and should be very easy to understand. You should have a copy of the opcodes help file.
I hope this was helpful
Posted on 2002-11-11 15:35:36 by MArtial_Code
Thank you
Posted on 2002-11-11 17:25:04 by HeXeN