« delphi 线程例子收藏的一些书 »

简单的汇编程序,缓冲区比较

#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;
}
  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

网站目录

最近发表

最新评论及回复

文章归档

Search

Powered By Z-Blog 1.8 Terminator(beta) Build 71218 Designed by Michael

Copyright 0-9999 subin.org.cn Rights Reserved. 晋ICP备08000685号