I would like a simple example for how to do the following in in-line assembly, x86, visual studio
for (int i=1; i<N; ++i)
{
// do something
}
I would like a simple example for how to do the following in in-line assembly, x86, visual studio
for (int i=1; i<N; ++i)
{
// do something
}
asm
{
mov ax, N
repeat:
dec ax
; do something
cmp ax, 0
jne repeat
}
or also:
asm
{
mov ecx, N
repeat:
; do something
loop repeat
}