我用 keil7.50 调试下面代码,模拟时竟然乱选择,请各位神仙驻足过目:#include <reg51.h> unsigned char W; OPSE(unsigned char t) { switch(t) { case 1: W=0x26; break; //不执行上一句,会跳到这里!!奇怪。 case 2: W=0x4c; break; case 3: W=0x98; break; case 4: W=0x98; break; case 5: W=0x26; break; case 6: W=0x26; break; default:break; } } main() { OPSE(1); while(1); }
|