调用C函数

来源:互联网 发布:linux添加用户 编辑:程序博客网 时间:2024/04/29 00:18

#include <stdio.h>

int power2( int num, int power );

void main()
{
 printf( "power( 4, 6 ) = %d", power2(4, 6) );
}

int power2( int num, int power )
{
 __asm
 {
  mov eax, num;
  mov ecx, power;
  shl eax, cl
 }
}
 

原创粉丝点击