Hi all,
I'm a newbie in ASM. I write a smallest code in C :
// vietwow.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int a =5;
}
And compile it with MS VS2008. And then I use IDA for reading ASM of it :
_wmain proc near
var_CC= byte ptr -0CCh
var_8= dword ptr -8
push ebp
mov ebp, esp
sub esp, 0CCh
push ebx
push esi
push edi
lea edi, [ebp+var_CC]
mov ecx, 33h
mov eax, 0CCCCCCCCh
rep stosd
mov [ebp+var_8], 5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
retn
_wmain endp
I have some question :
1/ In my code, I only declare 1 local variable (named i) and assign value "5" to it => it's var_8. So what is var_CC ? I try some another case and see that var_CC always available in every code
2/ what does "rep stosd" means ? It have read about stosd but I don't understand its role in this context ?
Anybody can help me ?
Thanx
Best Regards,