📄 cs16-2.lst
字号:
C51 COMPILER V7.06 CS16_2 02/18/2007 10:56:50 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE CS16_2
OBJECT MODULE PLACED IN CS16-2.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE CS16-2.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <REG51.H>
2 #define uint unsigned int
3 #define uchar unsigned char
4 uchar code SEG7[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
5 uchar code ACT[4]={0xfe,0xfd,0xfb,0xf7};
6 uint counter;
7 /****************************/
8 void initial(void)
9 {
10 1 TMOD=0x50;
11 1 TH1=0x00;
12 1 TL1=0x00;
13 1 IE=0x00;
14 1 TR1=1;
15 1 }
16 /******************************/
17 void delay(uint k)
18 {
19 1 uint data i,j;
20 1 for(i=0;i<k;i++)
21 1 {for(j=0;j<121;j++)
22 2 {;}}
23 1 }
24 /**********************************/
25 void display(void)
26 {
27 1 P0=SEG7[counter%10];P2= ACT[0];delay(1);
28 1 P0=SEG7[(counter%100)/10];P2= ACT[1];delay(1);
29 1 P0=SEG7[(counter/100)%10];P2= ACT[2];delay(1);
30 1 P0=SEG7[counter/1000];P2= ACT[3];delay(1);
31 1 }
32 /*********************************/
33 void main(void)
34 { uint temp1,temp2;
35 1 initial();
36 1 for(;;)
37 1 {
38 2 display();
39 2 temp1=TL1;temp2=TH1;
40 2 counter=(temp2<<8)+temp1;
41 2 }
42 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 235 ----
CONSTANT SIZE = 14 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 2 ----
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 + -