首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮解决个BUG   ,C 中汇编解决办法

2012-03-27 
帮解决个BUG   ,C 中汇编unsignedcharpciDevice[4]{0x01,0x10,0x01,0x80}unsignedintbaseAddress0xcf8

帮解决个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 试试

热点排行