Hi, as you already know, I'm new in MASM32, could you tell me some stringoperation ?
I already know
INVOKE lstrcpy, ADDR str1, ADDR str2

are ther some others ?

for example how i can get the lenght of a string an search for "*" ???

MfG Red Forginforcer
Posted on 2003-03-01 05:42:50 by Forginforcer
Check the Win32API reference,there are a lot of string manipulation functions.


lstrcat,lstrcmp,lstrcmpi,lstrcpy,lstrcpyn,lstrlen etc..

Have a look also at the masm32.lib which provides also string functions.

A quick demonstration:

.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib

mystring db 'String*',0
msg db 'The lenght of the string=',0
buffer db 10 dup(?)
invoke StdOut,addr msg
invoke StrLen,addr mystring
invoke dwtoa,eax,addr buffer
invoke StdOut,addr buffer
mov ebx,offset mystring
.WHILE byte ptr [ebx]!='*'
inc ebx
.ENDW ;ebx=location of *
invoke ExitProcess,0
end start

Posted on 2003-03-01 06:19:30 by Vortex
If I were a Girl i would give you a big bussi immediately !
where can i check the winapi32funktions ?
Posted on 2003-03-01 06:50:09 by Forginforcer
Posted on 2003-03-01 07:59:38 by Eóin