📄 system.lst
字号:
C51 COMPILER V7.06 SYSTEM 04/09/2005 13:15:56 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE SYSTEM
OBJECT MODULE PLACED IN system.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE system.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include "system.h"
2
3 static data volatile uchar key=KEY_NONE;
4 static data volatile uchar pressed=0;
5 static data uchar timer;
6
7 uchar gettimer()
8 {
9 1 return timer;
10 1 }
11
12 void cleartimer()
13 {
14 1 timer = 0;
15 1 }
16
17 uchar readkey()
18 {
19 1 uchar tmpkey=KEY_NONE;
20 1
21 1 ET0 = 0;
22 1
23 1 if(pressed)
24 1 {
25 2 pressed = 0;
26 2 tmpkey = key;
27 2 key = KEY_NONE;
28 2 }
29 1
30 1 ET0 = 1;
31 1 return tmpkey;
32 1 }
33
34 void intx0() interrupt 0 {}
35 void intx1() interrupt 2 {}
36 void intt1() interrupt 3 {}
37 void ints() interrupt 4 {}
38
39 void intt0() interrupt 1
40 {
41 1 unsigned char i,tmpkey;
42 1
43 1 TH0 = 55535/256;
44 1 TL0 = 55535%256;
45 1
46 1 timer++;
47 1
48 1 if(pressed) return;
49 1
50 1 P0 = 0x1f;
51 1 tmpkey = P0 & 0x1f;
52 1
53 1 if(tmpkey == 0x1f && key != KEY_NONE)
54 1 {
55 2 pressed = 1;
C51 COMPILER V7.06 SYSTEM 04/09/2005 13:15:56 PAGE 2
56 2 return;
57 2 }
58 1 /**/
59 1 key = KEY_NONE;
60 1 for(i=0;i<5;i++)
61 1 {
62 2 if(!(tmpkey&0x01))
63 2 {
64 3 key = i+1;
65 3 break;
66 3 }
67 2 tmpkey >>= 1;
68 2 }
69 1 }
70 /*
71 void printtime()
72 {
73 uchar buf[20];
74 uchar second,minute,hour,date,month,year;
75
76 if(gettimer() > 50)
77 {
78 cleartimer();
79
80 second = readsecond();
81 minute = readminute();
82 hour = readhour();
83 date = readdate();
84 month = readmonth();
85 year = readyear();
86 sprintf(buf,"20%02bx/%02bx/%02bx %02bx:%02bx:%02bx",year,month,date,hour,minute,second);
87 printstring8 (0,0,27,buf);//
88 }
89 }
90 */
91 void printtime()
92 {
93 1 uchar buf[20];
94 1 uchar second,minute,hour,date,month,year;
95 1
96 1 if(gettimer() > 50)
97 1 {
98 2 cleartimer();
99 2
100 2 second = readsecond();
101 2 minute = readminute();
102 2 hour = readhour();
103 2 date = readdate();
104 2 month = readmonth();
105 2 year = readyear();
106 2 sprintf(buf,"20%02bx-%02bx-%02bx",year,month,date);
107 2 printstring16(0,0,26,buf);//
108 2 sprintf(buf,"%02bx:%02bx:%02bx",hour,minute,second);
109 2 printstring16(0,2,28,buf);//
110 2 }
111 1 }
112
113
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 248 ----
C51 COMPILER V7.06 SYSTEM 04/09/2005 13:15:56 PAGE 3
CONSTANT SIZE = 38 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 3 25
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -