?? main.lst
字號(hào):
C51 COMPILER V6.23a MAIN 10/25/2008 20:27:53 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <AT89X52.H>
2 #include "LCD1602.H"
3 #include "DS12C887.H"
4
5 char ch[9];
6 //---------------------------------
7 void ISRex1(void) interrupt 2
8 {
9 1 unsigned char i,j;
10 1 GetTime();
11 1 if(t_hour<100)
12 1 {
13 2 i=t_hour/10;
14 2 j=t_hour%10;
15 2 ch[0]=i+0x30;
16 2 ch[1]=j+0x30;
17 2 ch[2]=':';
18 2 }
19 1 if(t_minute<100)
20 1 {
21 2 i=t_minute/10;
22 2 j=t_minute%10;
23 2 ch[3]=i+0x30;
24 2 ch[4]=j+0x30;
25 2 ch[5]=':';
26 2 }
27 1 if(t_second<100)
28 1 {
29 2 i=t_second/10;
30 2 j=t_second%10;
31 2 ch[6]=i+0x30;
32 2 ch[7]=j+0x30;
33 2 }
34 1 ch[8]=0;
35 1 LCDclearLine(0);
36 1 LCDdisplayStr("Time=");
37 1 LCDdisplayStr(ch);
38 1
39 1 GetDate();
40 1 LCDclearLine(1);
41 1 LCDdisplayStr("20");
42 1 if(d_year<100)
43 1 {
44 2 i=d_year/10;
45 2 j=d_year%10;
46 2 LCDdisplayChar(i+0x30);
47 2 LCDdisplayChar(j+0x30);
48 2 LCDdisplayChar(0);
49 2 }
50 1 if(d_month<100)
51 1 {
52 2 i=d_month/10;
53 2 j=d_month%10;
54 2 LCDdisplayChar(i+0x30);
55 2 LCDdisplayChar(j+0x30);
C51 COMPILER V6.23a MAIN 10/25/2008 20:27:53 PAGE 2
56 2 LCDdisplayChar(1);
57 2 }
58 1 if(d_day<100)
59 1 {
60 2 i=d_day/10;
61 2 j=d_day%10;
62 2 LCDdisplayChar(i+0x30);
63 2 LCDdisplayChar(j+0x30);
64 2 LCDdisplayChar(2);
65 2 }
66 1
67 1 GetWeek();
68 1 switch(week)
69 1 {
70 2 case 1: LCDdisplayStr(" Sun");
71 2 LCDdisplayChar(2);
72 2 break;
73 2 case 2: LCDdisplayStr(" Mon");
74 2 LCDdisplayChar(3);
75 2 break;
76 2 case 3: LCDdisplayStr(" Tue");
77 2 LCDdisplayChar(4);
78 2 break;
79 2 case 4: LCDdisplayStr(" Wed");
80 2 LCDdisplayChar(5);
81 2 break;
82 2 case 5: LCDdisplayStr(" Thu");
83 2 LCDdisplayChar(6);
84 2 break;
85 2 case 6: LCDdisplayStr(" Fri");
86 2 LCDdisplayChar(7);
87 2 break;
88 2 case 7: LCDdisplayStr(" Sat");
89 2 break;
90 2 default: break;
91 2 }
92 1
93 1 //清除中斷申請(qǐng)
94 1 DS12C887_Data_Port=0xc; //鎖存寄存器C地址
95 1 ALE(); //鎖存地址
96 1 ReadEn();
97 1 DS12C887_DS=1;
98 1 }
99
100 void main(void)
101 {
102 1 LCDreset();
103 1 LCDlight(1);
104 1 IT1=1;
105 1 EX1=1;
106 1 EA=1;
107 1 /*
108 1 t_second=0;
109 1 t_minute=0;
110 1 t_hour=0;
111 1 At_second=0;
112 1 At_minute=0;
113 1 At_hour=0;
114 1 week=0;
115 1 d_day=25;
116 1 d_month=10;
117 1 d_year=10;
C51 COMPILER V6.23a MAIN 10/25/2008 20:27:53 PAGE 3
118 1 DS12C887_init();
119 1 */
120 1 /*
121 1 t_second=0;
122 1 t_minute=52;
123 1 t_hour=19;
124 1 At_second=0xff;
125 1 At_minute=0xff;
126 1 At_hour=0xff;
127 1 week=7;
128 1 d_day=25;
129 1 d_month=10;
130 1 d_year=8;
131 1 SetTime();
132 1 SetDate();
133 1 SetWeek();
134 1 */
135 1 while(1);
136 1
137 1 }
138
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 517 ----
CONSTANT SIZE = 44 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 9 2
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -