Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Lungimea unui sir.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- int lungimeSir(const char *)
- {
- _asm {
- mov eax,[ebp+8]
- mov ecx,0
- startwhile:
- mov bl,[eax+ecx]
- cmp bl,'\0'
- je stopwhile
- inc ecx
- jmp startwhile
- stopwhile:
- mov eax,ecx
- }
- }
- int main()
- {
- char c[] = "Ana are mere";
- int i=0;
- i = lungimeSir(c);
- printf("%d", i);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement