keil C ´ÓÁãѧÆð ½Ìѵ1
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar num;
void main()
{
TMOD=0x01;
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
EA=1;
ET0=1;
TR0=1;
P1=0xFF;
while(1);
}
void T0_time() interrupt 1
{
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
num++;
if(num==20)
{
num=0;
if(P1==0x00)
{
P1=0xFF;
}
else
P1=P1>>1;
}
}
Èç¹ûÔÚinterrupt·þÎñº¯ÊýÖУ¬ifÅжÏP1==0x00д³ÉP1=0x00£¬ÄǾͳöÏÖ±àÒ뾯ºÅ£¨²¢·Ç´íÎó£©
warning C276: constant in condition expression ¾¯¸æ¡£
½ñÌì¸É¸É¿ªÊ¼Ñ§Ï°£¬¾ÍÓöµ½ÁËÓÉÓÚ´ÖÐÄÒýÆðµÄÎÊÌâ¡£
¿´À´Ò»¸öºÃµÄ±à³ÌÏ°¹ßÊDZà³ÌÕßʵ¼ùµÄ±ØÒªËØÖÊ¡£
Ïà¹ØÎĵµ£º
±àÕß°´
:·Ç³£»ù±¾¹ØÓÚCÓïÑÔµÄÎÊÌâ,Ò»¸öÐÅÏ¢Àà(¼ÆËã»ú,×ÊѶ¹¤³Ì,µç×Ó¹¤³Ì, ͨÐŹ¤³Ì)רҵµÄ±¾¿Æ±ÏÒµÉúÓ¦¸Ã´ïµ½µÄˮƽ¡£ÌâÄ¿²»ÄÑ,È«²¿¶¼ÄÜ¿ìËٵشðÍ꣬µ±È»Ò²ÐèÒªÒ»¶¨µÄ֪ʶ´¢±¸¡£
¶ÔÓÚ´ó¶àÊýÈË£¬ÎÒÃÇÔ¤ÆÚÄã¿ÉÄÜ´ð´í 3) 4) 15)Ì⣬ËùÒÔ´ð´í3µÀÒÔÄڵģ¬ÎÒÃÇÈÏΪÄãºÜ°ô
´ð´í5µÀÌâÒÔÄÚ£¬ÎÒÃÇÈÏΪÄ㻹²»´í(Ä ......
ÀûÓÃÊÀ½ç×îС×î¿ìµÄC±àÒëÆ÷´òÔì×Ô¼ºµÄC±à¼Æ÷
¼ò½étinycc ÊÀ½çÉÏ×îС±àÒëËÙ¶È×î¿ìµÄCÓïÑÔ±àÒëÆ÷ ¸÷ÏÄܽø¹Ù·½È¥¿´
TCC¹Ù·½ÏÂÔصØÖ·£ºhttp://ftp.twaren.net/Unix/NonGNU/tinycc/tcc-0.9.25-win32-bin.zip
ÎÒÖªµÀ ´ó¼Ò»ù±¾É϶¼ÓùýWIN—TC°É ÌرðÊÇÉϹý´óѧµÄ CÓïÑÔÈëÃÅʱÓõĶ¼ÊÇ
ËûµÄ²Ù×÷½çÃæÈçͼ
¹þ¹þ ¿´ÏÂÍ ......
±í´ïʽµÄ¸±×÷ÓÃ
ÔËËã·ûµÄÓÅÏȼ¶Óë½áºÏÐԹ涨Á˱í´ïʽÖÐÏàÁÚÁ½¸öÔËËã·ûµÄÔËËã´ÎÐò£¬µ«¶ÔÓÚË«Ä¿
ÔËËãµÄ²Ù×÷Êý£¬C++ûÓй涨ËûÃǵļÆËã´ÎÐò¡£ÀýÈ磬¶ÔÓÚ±í´ïʽ£º
exp1 + exp2;
ÏȼÆËã exp1 »¹ÊÇ exp2£¿²»Í¬µÄ±àÒëÆ÷Óв»Í¬µÄ×ö·¨¡£
ÔÚÊýѧÉÏ£¬¶ÔÓÚË«Ä¿ÔËËã·û£¬²»ÂÛÏȼÆËãÄÄÒ»¸ö²Ù×÷Êý£¬ÒªÇó×îÖÕ¼ÆËã½á¹ûÒ»Ñù¡£
ÔÚ C++ ......
ÎÊÌ⣺ÓÃJ2ME×ö»ùÓÚÊÖ»úµÄC/SģʽÓÎÏ·µÄÁ÷³Ì
²é¿´¸ÃÎÊÌâÍêÕûÄÚÈÝÈç¹û¿ÉÒÔ Çë½éÉÜÏ·þÎñÆ÷ºÍ¿Í»§¶ËµÈ·½±ãµÄÄÚÈݻشð£ºÕâЩÔÚ°Ù¶ÈÉϲ»ºÃÎÊ£¬È¥CSDNÎÊÓÃʲôÓïÑÔ×ö¶¼ÊÇÒ»ÑùµÄ£¬ÄãÓÃJ2ME×ö×ÔÈ»ÊÇ¿ÉÄÜÒªÔÚÊÖ»úÉÏÓ㬿´ÄãҪͨ¹ýÀ¶ÑÀ»¹ÊÇGPRS£¬µ«ÊDZà³ÌÉϱ¾ÖÊÇø±ð²»´ó£¬µ×²ã¶¼ÊÇ͸Ã÷µÄ¡£ÈçºÎ½¨Á¢Á¬½Ó£¬Í¨ÐÅÕâЩӦ¸ÃÃ÷°×°É£¬ ......