?? 串口通信.lst
字號:
C51 COMPILER V6.12 確_赺_衉 11/08/2008 17:10:38 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE 確_赺_衉
OBJECT MODULE PLACED IN .\串口通信.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE .\串口通信.c DEBUG OBJECTEXTEND
stmt level source
1 #include<reg52.h>
2 #define uint unsigned int
3 #define uchar unsigned char
4 uchar temp,qian,bai,shi,ge,tt;
5 sbit weil=P2^1;
6 sbit dual=P2^0;
7 sbit P3_4=P3^4;
8 sbit P3_5=P3^5;
9 sbit P3_6=P3^6;
10 sbit P3_7=P3^7;
11 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x76,0
-x73};
12 uchar code wela[]={0xfe,0xfd,0xfb,0xf7};
13 void delay(uint z);
14 void display(uint qian,uint bai,uint shi,uint ge);
15 void main()
16 { while(1)
17 1 {
18 2 if (P3_4==0)
19 2 {
20 3
21 3
22 3
23 3 TMOD=0x11;
24 3 TH0=(65536-50000)/256;
25 3 TL0=(65536-50000)%256;
26 3 EA=1;
27 3 ET0=1;
28 3 TR0=1;
29 3 tt=0;
30 3 temp=111;
31 3 while(1)
32 3 { if (tt==10)
33 4 { tt=0;
34 5 temp++;
35 5 if (temp==125)
36 5 {temp=0;}
37 5 bai=temp/100;
38 5 shi=temp%100/10;
39 5 ge=temp%10;
40 5 }
41 4 display(bai,shi,ge);
*** WARNING C209 IN LINE 41 OF .\串口通信.C: '_display': too few actual parameters
42 4 }
43 3 }
44 2 void display(uint qian,uint bai,uint shi,uint ge)
*** ERROR C141 IN LINE 44 OF .\串口通信.C: syntax error near 'void'
*** WARNING C209 IN LINE 44 OF .\串口通信.C: '_display': too few actual parameters
45 2 {
46 3 weil=1;
47 3 P0=0xfe;
48 3 weil=0;
49 3 dual=1;
50 3 P0=table[qian];
51 3 dual=0;
C51 COMPILER V6.12 確_赺_衉 11/08/2008 17:10:38 PAGE 2
52 3 delay(6);
53 3 weil=1;
54 3 P0=0xfd;
55 3 weil=0;
56 3 dual=1;
57 3 P0=table[bai];
58 3 dual=0;
59 3 delay(6);
60 3 weil=1;
61 3 P0=0xfb;
62 3 weil=0;
63 3 dual=1;
64 3 P0=table[shi];
65 3 dual=0;
66 3 delay(6);
67 3 weil=1;
68 3 P0=0xf7;
69 3 weil=0;
70 3 dual=1;
71 3 P0=table[ge];
72 3 dual=0;
73 3 delay(6);
74 3 }
75 2 void delay(uint z)
*** ERROR C141 IN LINE 75 OF .\串口通信.C: syntax error near 'void'
*** WARNING C209 IN LINE 75 OF .\串口通信.C: '_delay': too few actual parameters
76 2 {
77 2 uint x,y;
*** ERROR C202 IN LINE 77 OF .\串口通信.C: 'y': undefined identifier
78 2 for(x=z;x>0;x--)
*** ERROR C202 IN LINE 78 OF .\串口通信.C: 'x': undefined identifier
79 2 for(y=1000;y>0;y--);
*** ERROR C202 IN LINE 79 OF .\串口通信.C: 'y': undefined identifier
80 2 }
81 1 void timer0() interrupt 1
*** ERROR C141 IN LINE 81 OF .\串口通信.C: syntax error near 'void'
*** WARNING C206 IN LINE 81 OF .\串口通信.C: 'timer0': missing function-prototype
*** ERROR C141 IN LINE 81 OF .\串口通信.C: syntax error near 'interrupt'
82 1 {
*** ERROR C141 IN LINE 82 OF .\串口通信.C: syntax error near '{'
83 2 TH0=(65536-1000)/256;
84 2 TL0=(65536-1000)%256;
85 2 tt++;
86 2 }
87 1 void timer1() interrupt 3
*** ERROR C141 IN LINE 87 OF .\串口通信.C: syntax error near 'void'
*** WARNING C206 IN LINE 87 OF .\串口通信.C: 'timer1': missing function-prototype
*** ERROR C141 IN LINE 87 OF .\串口通信.C: syntax error near 'interrupt'
88 1 {
*** ERROR C141 IN LINE 88 OF .\串口通信.C: syntax error near '{'
89 2 TH0=(65536-1000)/256;
90 2 TL0=(65536-1000)%256;
91 2 tt++;
92 2 }
93 1
*** ERROR C141 IN LINE 93 OF .\串口通信.C: syntax error near ''
C51 COMPILATION COMPLETE. 5 WARNING(S), 12 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -