#include "stdio.h"
#include "conio.h"
short pow_16(short a, short b)算的是a*2^(b-1).
{
short result;
--b;
__asm{
mov ax, a;
mov cx, b;
s: add ax, ax;
loop s;
mov result, ax;
}
return result;
}
main()
{ short a=3;
short b=4;
short ret=pow_16(a, b);
printf("%d\n",ret);
getch();
}
c内嵌汇编
最新推荐文章于 2021-11-20 22:25:16 发布