高手赐教!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
这是我的一本书的范例代码,可是我在vc++6下面调试不能运行
为何?????
出错信息是:error C2443: operand size conflict
#pragma inline
#include <dos.h>
#include <stdio.h>
#include <math.h>
main()
{
int i,temp;
int port=956;
/* clear the text screen */
__asm{
mov cx ,0
mov dx ,2497H
mov bh ,7
mov ax ,0600H
int 10H
}
for (i=0; i<9;i++)
{
temp=(int)pow(2.0,(double)i);
/*gain access to the parallel port */
__asm{
mov dx ,port
mov eax ,temp //就是这里error C2443: operand size conflict
out dx ,al
}
printf("%d\n",temp);
delay(1000);
}
return(0);
}
该如何修改呢??