| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 271 人关注过本帖
标题:很怪异的一个问题
只看楼主 加入收藏
dingppp23
Rank: 1
等 级:新手上路
帖 子:19
专家分:5
注 册:2008-11-19
结帖率:100%
收藏
 问题点数:0 回复次数:2 
很怪异的一个问题
#include<stdio.h>
int main(void)
{
    unsigned char r_18,r_19,r_1a,r_1b,r_1c,r_1d,r_1e,r_1f;
    unsigned char r9,ra,rb,rc,r10,r11,r12;
    int r9_b,ra_b,rb_b,rc_b,r10_b;
    int r18_b,r19_b,r1a_b,r1b_b,r1c_b,r1d_b,r1e_b,r1f_b;
    int flag=0,z,w,c;
    int r18,r19,r1a,r1b,r1c,r1d,r1e,r1f;
    /*for(r18=0x00;(r18<0x100)&&(flag!=1);r18++)
     for(r19=0x00;(r19<0x100)&&(flag!=1);r19++)
      for(r1a=0x00;(r1a<0x100)&&(flag!=1);r1a++)
       for(r1b=0x00;(r1b<0x100)&&(flag!=1);r1b++)
        for(r1c=0x00;(r1c<0x100)&&(flag!=1);r1c++)
         for(r1d=0x00;(r1d<0x100)&&(flag!=1);r1d++)
          for(r1e=0x00;(r1e<0x100)&&(flag!=1);r1e++)
           for(r1f=0x00;(r1f<0x100)&&(flag!=1);r1f++)*/
                {
                     r18=0xa3;
                     r19=0xa0;
                     r1a=0x4e;
                     r1b=0x40;
                     r1c=0xf1;
                     r1d=0x91;
                     r1e=0x39;
                     r1f=0x41;   
                     r_18=(unsigned char)r18;
                     r_19=(unsigned char)r19;   
                     r_1a=(unsigned char)r1a;   
                     r_1b=(unsigned char)r1b;   
                     r_1c=(unsigned char)r1c;   
                     r_1d=(unsigned char)r1d;   
                     r_1e=(unsigned char)r1e;   
                     r_1f=(unsigned char)r1f;   
                     r9=0xf4;     
                     ra=0x66;     
                     rb=0x6a;     
                     rc=0x9d;     
                     r12=0x0c;
                    do
                        {
                            r11=0x30;
                            do
                                {
                                     if(r12!=0x01)
                                         {
                                             r10=((rb&0x08)==0)?0x01:0x10;
                                             if((ra&0x01)==0x01)   
                                                   r10<<=2;
                                              if((r9&0x01)==0x01)
                                                   r10<<=1;
                                              z=0;
                                              if(((rc|0xfd)==0xfd)&&((rc|0xbf)==0xbf))
                                                  {
                                                    if((r10&0x2e)==0x00)
                                                          z=1;  
                                                  }
                                              if(((rc|0xfd)==0xfd)&&((rc&0x40)!=0x00))
                                                  {
                                                    if((r10&0x74)==0x00)
                                                        z=1;  
                                                  }
                                              if(((rc&0x02)!=0x00)&&((rc|0xbf)==0xbf))
                                                  {
                                                    if((r10&0x5c)==0x00)
                                                        z=1;  
                                                  }
                                              if(((rc&0x02)!=0)&&((rc&0x40)!=0))
                                                  {
                                                    if((r10&0x3a)==0x00)
                                                        z=1;  
                                                  }
                                              w=(z==1)?0x80:0;
                                              r10=((w^ra)^rc)^r1d;
                                              r10_b=((r10&0x80)==0x00)?0:1;
                                              r9_b=((r9&0x80)==0x00)?0:1;
                                              ra_b=((ra&0x80)==0x00)?0:1;
                                               rb_b=((rb&0x80)==0x00)?0:1;
                                              /*rc_b=((rc&0x80)==0)?0:1;*/
                                              r10<<=1;
                                              /*if(rc_b==1)
                                            //r10=r10|0x01;*/
                                              r9<<=1;
                                              if(r10_b==1)
                                                r9=r9|0x01;
                                              ra<<=1;
                                              if(r9_b==1)
                                                ra=ra|0x01;
                                              rb<<=1;
                                              if(ra_b==1)
                                                rb=rb|0x01;
                                              rc<<=1;
                                              if(rb_b==1)
                                                rc=rc|0x01;
                                               //if((r9==0x0f)&&(ra==0x1b)&&(rb==0xed)&&(rc==0x93))
                                                   {
                                                //    flag=1;
                                                //    break;   
                                                   }
                                         }
                                     r18_b=((r_18&0x80)==0)?0:1;
                                        r19_b=((r_19&0x80)==0)?0:1;
                                        r1a_b=((r_1a&0x80)==0)?0:1;
                                        r1b_b=((r_1b&0x80)==0)?0:1;
                                        r1c_b=((r_1c&0x80)==0)?0:1;
                                        r1d_b=((r_1d&0x80)==0)?0:1;
                                        r1e_b=((r_1e&0x80)==0)?0:1;
                                       r1f_b=((r_1f&0x80)==0)?0:1;
                                       r_1c<<=1;
                                       if(r1b_b==1)
                                         r_1c=r_1c|0x01;
                                       r_1d<<=1;
                                       if(r1c_b==1)
                                         r_1d=r_1d|0x01;
                                       r_1e<<=1;
                                       if(r1d_b==1)
                                        r_1e=r_1e|0x01;
                                       r_1f<<=1;
                                       if(r1e_b==1)
                                         r_1f=r_1f|0x01;
                                       r_18<<=1;
                                       if(r1f_b==1)
                                         r_18=r_18|0x01;
                                       r_19<<=1;
                                       if(r18_b==1)
                                         r_19=r_19|0x01;
                                       r_1a<<=1;
                                       if(r19_b==1)
                                         r_1a=r_1a|0x01;
                                       r_1b<<=1;
                                       if(r1a_b==1)
                                            r_1b=r_1b|0x01;
                                     printf("r9=0x%x  ra=0x%x  rb=0x%x  rc=0x%x\n",r9,ra,rb,rc);
                                }while((--r11)!=0x00);
                            //if(flag==1)
                                //break;
                        
                        }while((--r12)!=0x00);   
                    
                }
    printf("r9=0x%x  ra=0x%x  rb=0x%x  rc=0x%x",r9,ra,rb,rc);
    return 0;
}
如果我两个do_while语句注释掉,第一个结果会不一样,我用编译器是C_free
搜索更多相关主题的帖子: 怪异 
2010-05-15 16:20
冥卫
Rank: 8Rank: 8
来 自:深山老林
等 级:蝙蝠侠
帖 子:280
专家分:772
注 册:2010-4-20
收藏
得分:0 
可能是编译器的原因
2010-05-15 16:28
dingppp23
Rank: 1
等 级:新手上路
帖 子:19
专家分:5
注 册:2008-11-19
收藏
得分:0 
回复 2楼 冥卫
可是我用win_tc和Turbo3.0都是这样的结果
2010-05-15 16:48
快速回复:很怪异的一个问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021557 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved