
21.12.2008, 17:24
|
|
Постоянный
Регистрация: 12.07.2006
Сообщений: 327
С нами:
10437270
Репутация:
117
|
|
Сообщение от tekton
Мене просто надо скопировать сообщение с одного адреса в другой!
Код:
;=====================================================================
; StrCpy
;=====================================================================
; This procedure copies a string into a buffer. If the buffer is smaller
; than the string to copy, it returns 0.
;=====================================================================
StrCpy PROC uses edi esi StrBuffer:DWORD,String:DWORD
invoke StrLen,String
mov ecx,eax
mov edi,StrBuffer
mov esi,String
rep movsb
ret
StrCpy ENDP
Код:
;=====================================================================
; StrLen
;=====================================================================
; This procedure takes an address of a string as its parameter and
; returns the length of the string in eax
;=====================================================================
StrLen PROC uses edi String:DWORD
mov edi,String
mov al,0
mov ecx,0FFFFFFFFh
repne scasb
sub ecx,0FFFFFFFFh
neg ecx
dec ecx
mov eax,ecx
ret
StrLen ENDP
полезно смотреть хорошие исходники).
|
|
|