当前位置:编程学习 > 网站相关 >>

WIN32汇编小练习

int strlen(char *strIn)
{
__asm
{
   MOV esi,strIn
   XOR eax,eax
   CDQ
__loop:
   LODSB
   CMP al,ah
   JE __end
   INC EDX
   JMP __loop
__end:
   MOV eax,edx
}
}

}
char *strcpy(char *dsbuf,char *ssbuf)
{
__asm
{
   MOV esi,ssbuf
   MOV edi,dsbuf
__loop:
   LODSB
   STOSB
   CMP al,0
   JE __end
   JMP __loop
__end:
   MOV eax,edi
}
}

补充:综合编程 , 其他综合 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,