Take a look at the following code:
void f()
{
}
I compiled this in Visual Studio 2013, debug, 32-bit mode and looked at the dissassembly.
void f()
{
00304CB0 push ebp
00304CB1 mov ebp,esp
00304CB3 sub esp,0C0h
00304CB9 push ebx
00304CBA push esi
00304CBB push edi
00304CBC lea edi,[ebp-0C0h]
00304CC2 mov ecx,30h
00304CC7 mov eax,0CCCCCCCCh
00304CCC rep stos dword ptr es:[edi]
}
00304CCE pop edi
00304CCF pop esi
00304CD0 pop ebx
00304CD1 mov esp,ebp
00304CD3 pop ebp
00304CD4 ret
What is the purpose of the rep stos instruction?
I'm just curious.