读书人

帮解决个BUG   C 中汇编解决

发布时间: 2012-03-27 13:44:24 作者: rapoo

帮解决个BUG   ,C 中汇编
unsigned char pciDevice[4]={0x01,0x10,0x01,0x80};
unsigned int baseAddress=0xcf8;
unsigned char temp;
for(int i=0;i <=4;i++)
{
baseAddress++;
temp=*(pciDevice+i);
_asm
{
mov dx, baseAddress
mov al,temp
out dx,al
}
}


编译说 mov al,temp  operand size conflict  感到很奇怪

[解决办法]
一个一个加 BYTE PTR 试试

读书人网 >C++

热点推荐