一个小demo:
#include<stdio.h> void main(){ int k=0; char *str="i=%d "; printf("begin "); __asm{ mov k,0 bbbb: nop mov eax,k add eax,1 mov k,eax cmp k,5 jge aaaa mov ecx,k push ecx push str call printf add esp,8 jmp bbbb aaaa: nop } }
一个小demo:
#include<stdio.h> void main(){ int k=0; char *str="i=%d "; printf("begin "); __asm{ mov k,0 bbbb: nop mov eax,k add eax,1 mov k,eax cmp k,5 jge aaaa mov ecx,k push ecx push str call printf add esp,8 jmp bbbb aaaa: nop } }