Hi, I want to increase the last byte of a string(DD).
And how i can change the 3-th or 4th ?

Bye !
Posted on 2003-03-04 02:00:58 by Forginforcer



.386
.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

.data
mystring db 'Big bug',0
.code
start:
mov ebx,offset mystring
mov byte ptr [ebx+5],'e' ; Replace 'u' with 'e'
invoke StdOut,ebx
invoke ExitProcess,0
end start

Posted on 2003-03-04 03:12:39 by Vortex
aaaaaaaaaaaaaaah !
Thanks !

i learn more and more !

I own you out there grate thanks an big bussis !
Posted on 2003-03-04 07:19:33 by Forginforcer
i want to use copy string with rep, scas, stos.
how can. just give me simple without use api strcpy
Posted on 2003-03-17 00:01:11 by irwan
irwan,

have a look at the memory copy routine in the MASM32 library, without using MMX, it is hard to beat.

Regards,

hutch@movsd.com
Posted on 2003-03-17 00:56:44 by hutch--
copy string to string?



invoke lstrlen,OFFSET mystring
xchg eax,ecx; if you know the stringlength, just mov ecx, stringlength
lea esi, mystring
lea edi,dest
rep movsb
Posted on 2003-03-17 01:32:03 by roticv