#include
<stdio.h>
//#include <stdlib.h>
//#include "test.h"
int
cmp(
int
a,
int
b)
{
int
x = 100;
__asm
{
MOV eax,[a];
CMP eax,[b];
JLE min;
MOV eax,b;
}
min:
__asm
mov dword ptr[x],eax;
return
x;
}
int
main(
int
argc,
char
* argv[]){
char
hello[]=
"hello"
;
char
world[]=
"world"
;
char
format[]=
"%s %s\n"
;
int
m;
__asm
{
lea esi,world;
push esi;
lea esi,hello;
push esi;
lea esi,format;
push esi;
call dword ptr printf;
pop ebx;
pop ebx;
pop ebx;
}
m = cmp(10000,2000);
printf(
"\n%d\n"
,m);
//test();
//system("pause");
return
0;
}