#include <windows.h>
#include <stdio.h>
int a[]={1,2,3,4,5,6};
int b[]={1,4,5,6,5,8};
bool bj(int *a,int *b,int len)
{
bool t=false;
__asm
{
MOV ECX,len
MOV EDX,len
MOV EDI,a
MOV ESI,b
REP CMPSD
JNZ SU
MOV t,TRUE
JMP EXITREG
SU:
MOV t, FALSE // 不相等
EXITREG:
}
return t;
}
int main()
{
if (bj(a,b,6))
printf("true");
else
printf("falsh");
return 0;
}