c嵌入汇编


ch无用

   
  #include<stdio.h>
  
void strcpy(const char *sou,char *dest)
{
char ch;
_asm{
start:mov ch,byte ptr[sou]
inc sou
mov byte ptr[dest],ch
inc dest
cmp ch,'\0'
jne start
}
}
int main()
{
char *a = "forget it and move on!";
char b[64];

strcpy(a,b);
printf("original: %s", a);
printf("copyed: %s", b);
return 0;
}

c 汇编

无节操的神官 11 years ago

Your Answer