unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Programming > Assembly

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2007, 12:27 PM
Neo_Reloaded Neo_Reloaded is offline
Tutorial Admin
 
Join Date: Dec 2006
Posts: 259
Default szlength()

By Ksbunker

Was bored so decided to write my own String Length function for NULL terminated strings. Hopefully willspark some interest in this ASM subsection, it's almost dead ;-P!

Code:
szLength PROC uses ESI ECX lpString:DWORD
 
 xor eax, eax
 mov ecx, lpString
 mov esi, lpString
 
 @@:
 inc esi
 cmp byte ptr [esi], 0
 jnz @B

 sub esi, ecx
 xchg eax, esi

 ret
 
szLength ENDP
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
szlength

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 06:17 AM.