⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lst

📁 使用显示芯片ZLG7290
💻 LST
📖 第 1 页 / 共 5 页
字号:
 616   8                                                                              }
 617   7                                                                      }
 618   6                                                                      //月份
 619   6                                                                      if (uMonth==2)
 620   6                                                                      {
 621   7                                                                              iAll_time+=31;
 622   7                                                                                                                              }
 623   6                                                                      if ( (!(i%4)) && ( ((!(i%100))&&(!(i%400))) || (i%100) ) )   //闰年
 624   6                                                                      {                                                               
 625   7                                                                              if (uMonth==3)
 626   7                                                                              {
 627   8                                                                                      iAll_time+=60;                                                                          
 628   8                                                                              }
 629   7                                                                              if (uMonth==4)
 630   7                                                                              {
 631   8                                                                                      iAll_time+=91;
 632   8                                                                              }
 633   7                                                                              if (uMonth==5)
 634   7                                                                              {
 635   8                                                                                      iAll_time+=121;
 636   8                                                                              }
 637   7                                                                              if (uMonth==6)
 638   7                                                                              {
 639   8                                                                                      iAll_time+=152;
 640   8                                                                              }
 641   7                                                                              if (uMonth==7)
 642   7                                                                              {
 643   8                                                                                      iAll_time+=182;
 644   8                                                                              }
 645   7                                                                              if (uMonth==8)
 646   7                                                                              {
 647   8                                                                                      iAll_time+=213;
 648   8                                                                              }
 649   7                                                                              if (uMonth==9)
 650   7                                                                              {
 651   8                                                                                      iAll_time+=244;
 652   8                                                                              }
 653   7                                                                              if (uMonth==0)
 654   7                                                                              {
 655   8                                                                                      iAll_time+=274;
 656   8                                                                              }
 657   7                                                                              if (uMonth==11)
 658   7                                                                              {
 659   8                                                                                      iAll_time+=304;
 660   8                                                                              }
 661   7                                                                              if (uMonth==12)
 662   7                                                                              {
 663   8                                                                                      iAll_time+=335;
 664   8                                                                              }
 665   7                                                                              //if (uMonth==12)
 666   7                                                                              //{
 667   7                                                                              //      iAll_time+=366;
 668   7                                                                              //}
 669   7                                                                      }else
 670   6                                                                      {
 671   7                                                                              if (uMonth==3)
 672   7                                                                              {
 673   8                                                                                      iAll_time+=59;                                                                          
 674   8                                                                              }
 675   7                                                                              if (uMonth==4)
C51 COMPILER V8.05a   MAIN                                                                 01/11/2008 12:42:17 PAGE 12  

 676   7                                                                              {
 677   8                                                                                      iAll_time+=90;
 678   8                                                                              }
 679   7                                                                              if (uMonth==5)
 680   7                                                                              {
 681   8                                                                                      iAll_time+=120;
 682   8                                                                              }
 683   7                                                                              if (uMonth==6)
 684   7                                                                              {
 685   8                                                                                      iAll_time+=151;
 686   8                                                                              }
 687   7                                                                              if (uMonth==7)
 688   7                                                                              {
 689   8                                                                                      iAll_time+=181;
 690   8                                                                              }
 691   7                                                                              if (uMonth==8)
 692   7                                                                              {
 693   8                                                                                      iAll_time+=212;
 694   8                                                                              }
 695   7                                                                              if (uMonth==9)
 696   7                                                                              {
 697   8                                                                              iAll_time+=243;
 698   8                                                                              }
 699   7                                                                              if (uMonth==10)
 700   7                                                                              {
 701   8                                                                                      iAll_time+=273;
 702   8                                                                              }
 703   7                                                                              if (uMonth==11)
 704   7                                                                              {
 705   8                                                                                      iAll_time+=303;
 706   8                                                                              }
 707   7                                                                              if (uMonth==12)
 708   7                                                                              {
 709   8                                                                                      iAll_time+=334;
 710   8                                                                              }
 711   7                                                                      //if (uMonth==12)
 712   7                                                                      //{
 713   7                                                                              //      iAll_time+=365;
 714   7                                                                      //}
 715   7                                                                      }
 716   6                                                                      iAll_time+=(uDate-1);
 717   6                                                                      uWeek_DisBuffer[7]=(iAll_time%7+6)%7;
 718   6                                                                      if(uWeek_DisBuffer[7]==0)
 719   6                                                                      {
 720   7                                                                              uWeek_DisBuffer[7]=7;   
 721   7                                                                      }
 722   6                                                                      //日期
 723   6                                                                      break;
 724   6                                                              case 3: //对星期进行处理
 725   6                                                                      if (cNum_key2==0x10)
 726   6                                                                      {
 727   7                                                                              if (uWeek_DisBuffer[7]<7)
 728   7                                                                              {
 729   8                                                                                      uWeek_DisBuffer[7]++;
 730   8                                                                              }else
 731   7                                                                              {
 732   8                                                                                      uWeek_DisBuffer[7]=1;
 733   8                                                                              }
 734   7                                                                      }
 735   6                                                                      break;
 736   6                                                              case 4: //对秒表进行处理
 737   6                                                                      break;
C51 COMPILER V8.05a   MAIN                                                                 01/11/2008 12:42:17 PAGE 13  

 738   6                                                              case 5: //对闹钟进行处理
 739   6                                                                      switch (cNum_key2)
 740   6                                                                      {
 741   7                                                                              case 0x01:
 742   7                                                                              case 0x02:
 743   7                                                                                      uHour = uAlarm_DisBuffer[0]*10+uAlarm_DisBuffer[1];
 744   7                                                                                      if (uHour<23)
 745   7                                                                                      {
 746   8                                                                                              uHour++;
 747   8                                                                                      }else
 748   7                                                                                      {
 749   8                                                                                              uHour = 0;
 750   8                                                                                      }
 751   7                                                                                      uAlarm_DisBuffer[0] = uHour/10;
 752   7                                                                                      uAlarm_DisBuffer[1] = uHour%10;
 753   7                                                                                      break;
 754   7                                                                              //case 0X04:
 755   7                                                                              //      break;
 756   7                                                                              case 0X08:
 757   7                                                                                      if (uAlarm_DisBuffer[3]==5)
 758   7                                                                                      {
 759   8                                                                                              uAlarm_DisBuffer[3]=0;
 760   8                                                                                      }else{
 761   8                                                                                              uAlarm_DisBuffer[3]++;
 762   8                                                                                      }
 763   7                                                                                      break;
 764   7                                                                              case 0X10:
 765   7                                                                                      if (uAlarm_DisBuffer[4]==9)
 766   7                                                                                      {
 767   8                                                                                              uAlarm_DisBuffer[4]=0;
 768   8                                                                                      }else{
 769   8                                                                                              uAlarm_DisBuffer[4]++;
 770   8                                                                                      }
 771   7                                                                                      break;
 772   7                                              

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -