home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / cdfm.zip / STRLEN.RT < prev    next >
Text File  |  1992-06-10  |  477b  |  22 lines

  1. public  _strlen
  2. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  3. ; Get length of ASCIIZ string
  4. ; In:
  5. ;   EDX -> string
  6. ; Out:
  7. ;   EAX - length
  8. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  9. _strlen:
  10.         push ecx
  11.         push edi
  12.         mov edi,edx
  13.         mov ecx,-1
  14.         xor al,al
  15.         repnz scasb
  16.         mov eax,-2
  17.         sub eax,ecx
  18.         pop edi
  19.         pop ecx
  20.         ret
  21.  
  22.