home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
asm_programming
/
STRLEN.RT
< prev
next >
Wrap
Text File
|
1993-01-09
|
477b
|
22 lines
public _strlen
;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
; Get length of ASCIIZ string
; In:
; EDX -> string
; Out:
; EAX - length
;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
_strlen:
push ecx
push edi
mov edi,edx
mov ecx,-1
xor al,al
repnz scasb
mov eax,-2
sub eax,ecx
pop edi
pop ecx
ret