Right, thats probably one of the few instances when your for loop doesn't use the vb runtime
here is almost identical code that uses the runtime:
Code:
Public Sub Form_Load()
Dim i As Integer
Dim x As Integer
For i = 0 To 10
x = x ^ i
Next
End Sub
and here is the asm code
Code:
.text:00401939 loc_401939: ; CODE XREF: .text:00401973j
.text:00401939 movsx ecx, si
.text:0040193C mov [ebp-30h], ecx
.text:0040193F fild dword ptr [ebp-30h]
.text:00401942 fstp qword ptr [ebp-38h]
.text:00401945 mov edx, [ebp-34h]
.text:00401948 mov ecx, [ebp-38h]
.text:0040194B push edx
.text:0040194C push ecx
.text:0040194D movsx edx, ax
.text:00401950 mov [ebp-3Ch], edx
.text:00401953 fild dword ptr [ebp-3Ch]
.text:00401956 fstp qword ptr [ebp-44h]
.text:00401959 mov eax, [ebp-40h]
.text:0040195C mov ecx, [ebp-44h]
.text:0040195F push eax
.text:00401960 push ecx
.text:00401961 call ds:__vbaPowerR8 <-- runtime
.text:00401967 call edi ; __vbaFpI2 <-- runtime
.text:00401969 add si, 1
.text:0040196D jo short loc_40199B
.text:0040196F cmp si, 0Ah
.text:00401973 jle short loc_401939
see how bloated that code is, and its a simple for loop with x = x ^ i. most for loops are going to do more than simple math operations though. so an average for loop, like i said, is going to make atleast 6-8 calls to the vbruntime.