📄 main.lst
字号:
C51 COMPILER V8.02 MAIN 12/11/2006 20:54:22 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include <AT89X52.H>
2
3 unsigned char code dispbitcode[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
4 unsigned char code dispcode[]={0x3f,0x6f,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00};
5 unsigned char dispbuf[8]={10,10,10,10,0,0,0,0};
6 unsigned char dispcount;
7 unsigned char getdata;
8 unsigned int temp;
9 unsigned char i;
10
11 sbit ST=P3^0;
12 sbit OE=P3^1;
13 sbit EOC=P3^2;
14 sbit CLK=P3^3;
15
16 void main()
17 {
18 1 ST=0;
19 1 OE=0;
20 1 ET0=1;
21 1 ET1=1;
22 1 EA=1;
23 1 TMOD=0X12;
24 1 TH0=216;
25 1 TL0=216;
26 1 TH1=(65536-4000)/256;
27 1 TL1=(65536-4000)%256;
28 1 TR1=1;
29 1 TR0=1;
30 1 ST=1;
31 1 ST=0;
32 1 while(1)
33 1 {
34 2 if(EOC==1)
35 2 {
36 3 OE=1;
37 3 getdata=P0;
38 3 OE=0;
39 3 temp=getdata*235;
40 3 temp=temp/128;
41 3 i=5;
42 3 dispbuf[0]=10;
43 3 dispbuf[1]=10;
44 3 dispbuf[2]=10;
45 3 dispbuf[3]=10;
46 3 dispbuf[4]=0;
47 3 dispbuf[5]=0;
48 3 dispbuf[6]=0;
49 3 dispbuf[7]=0;
50 3 while(temp/10)
51 3 {
52 4 dispbuf[i]=temp%10;
53 4 temp=temp/10;
54 4 i++;
55 4 }
C51 COMPILER V8.02 MAIN 12/11/2006 20:54:22 PAGE 2
56 3 dispbuf[i]=temp;
57 3 ST=1;
58 3 ST=0;
59 3 }
60 2 }
61 1
62 1 }
63
64 void t0(void) interrupt 1 using 0
65 {
66 1 CLK=~CLK;
67 1 }
68
69 void t1(void) interrupt 3 using 0
70 {
71 1 TH1=(65536-4000)/256;
72 1 TL1=(65536-4000)%256;
73 1 P1=dispcode[dispbuf[dispcount]];
74 1 P2=dispcode[dispcount];
75 1 if(dispcount==7)
76 1 {
77 2 P1=P1|0X80;
78 2 }
79 1 dispcount++;
80 1 if(dispcount==8)
81 1 {
82 2 dispcount=0;
83 2 }
84 1 }
85
86
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 215 ----
CONSTANT SIZE = 18 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 13 ----
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 + -