views:

29

answers:

1

i am passing two strings from a c file to asm file as parameters. then i move these to ecx and edx from stack. how can i know exactly what their lengths are? like strlen(string) in c?

    push ebp
    mov  ebp,esp
    mov  ecx,[ebp+8]
    mov  edx,[ebp+12]
+3  A: 

strlen (et.al.) use the trailing NUL '\0' character to indicate End Of String. Your asm can do the same.

KevinDTimm