📄 60stime.lst
字号:
C51 COMPILER V8.02 60STIME 10/27/2008 21:43:57 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE 60STIME
OBJECT MODULE PLACED IN 60stime.OBJ
COMPILER INVOKED BY: e:\Keil\C51\BIN\C51.EXE 60stime.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #if 1
2 #include "reg51.h"
3 #define SEG P0
4 #define SCANP P1
5 #define LED P2
6 #define count_M1 50000
7 #define TH_M1 (65536-count_M1)/256
8 #define TL_M1 (65536-count_M1)%256
9 int count_T0=0;
10 #define count_M2 250
11 #define TH_M2 (256-count_M2)
12 #define TL_M2 (256-count_M2)
13 char count_T1=0;
14 char TAB[10]={0xc0,0xf9,0xa4,0xb0,0x99,
15 0x92,0x83,0xf8,0x80,0x98};
16 char disp[2]={0xc0,0xc0};
17 char seconds=0;
18 char scan=0;
19 main()
20 { IE=0x8a;
21 1 TMOD=0x21;TH0=TH_M1;
22 1 TL0=TL_M1;
23 1 TR0=1;
24 1 TH1=TH_M2;
25 1 TL1=TL_M2;
26 1 TR1=1;
27 1 LED=0x00;
28 1 while(1);
29 1 }
30 void T0_1s(void)interrupt 1
31 { TH0=TH_M1;TL0=TL_M1;
32 1 if(++count_T0==20)
33 1 { count_T0=0;
34 2 seconds++;
35 2 if(seconds==60)
36 2 { seconds=0;
37 3 LED=~LED;
38 3 }
39 2 }
40 1 disp[0]=TAB[seconds/10];
41 1 disp[1]=TAB[seconds%10];
42 1 }
43 void T1_8ms(void)interrupt 3
44 { if(++count_T1==32)
45 1 { count_T1=0;
46 2 if(++scan==3)scan=1;
47 2 SEG=0xff;
48 2 SCANP=~scan;
49 2 SEG=disp[scan-1];
50 2 }
51 1
52 1 }
53 #endif
54
C51 COMPILER V8.02 60STIME 10/27/2008 21:43:57 PAGE 2
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 203 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 17 ----
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 + -