📄 delay.lst
字号:
C51 COMPILER V6.12 DELAY 04/11/2006 11:58:36 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE DELAY
OBJECT MODULE PLACED IN .\Delay.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE .\Delay.c ROM(SMALL) BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include<at89x51.h>//全部为12MHz晶振
2 #include<intrins.h>
3 //************************1ms延时*************************************//
4 void delayx1ms(long count)
5 {long i,j;
6 1 for(i=0;i<count;i++)
7 1 for(j=0;j<138;j++);
8 1 }
9 //***********************************//
10 void delayx1ms1(long count)
11 {long j;
12 1 while(count--!=0)
13 1 for(j=0;j<72;j++);
14 1 }
15 //***********************************//
16 void delay1ms2(Byte count)
*** ERROR C141 IN LINE 16 OF .\DELAY.C: syntax error near 'count', expected ')'
17 {Byte i,j,k;
*** ERROR C141 IN LINE 17 OF .\DELAY.C: syntax error near 'i'
*** ERROR C202 IN LINE 17 OF .\DELAY.C: 'i': undefined identifier
18 1 for(i=0;i<count;i++)
*** ERROR C202 IN LINE 18 OF .\DELAY.C: 'i': undefined identifier
19 1 for(j=0;j<40;j++)
*** ERROR C202 IN LINE 19 OF .\DELAY.C: 'j': undefined identifier
20 1 for(k=0;k<120;k++)
*** ERROR C202 IN LINE 20 OF .\DELAY.C: 'k': undefined identifier
21 1 ;
22 1 }
23 //************************10ms延时*************************************//
24 void delayx10ms(long count)
25 {long i,j,k;
26 1 for(i=0;i<count;i++)
27 1 for(j=0;j<10;j+)
*** ERROR C141 IN LINE 27 OF .\DELAY.C: syntax error near ')'
28 1 for(k=0;k<120;k++)
29 1 ;
30 1 }
31 void delay10ms1(long count)
32 {long j,k;
33 1 while(count--!=0)
34 1 {for(j=0;j<10;j++)
35 2 for(k=0;k<72;k++)
36 2 ;
37 2 }
38 1 }
39 //*************************50us延时****************************************//
40 void delay50us(Byte count)
*** ERROR C141 IN LINE 40 OF .\DELAY.C: syntax error near 'count', expected ')'
41 {Byte i,j;
*** ERROR C141 IN LINE 41 OF .\DELAY.C: syntax error near 'i'
*** ERROR C202 IN LINE 41 OF .\DELAY.C: 'i': undefined identifier
42 1 for(j=0;j<count;j++)
*** ERROR C202 IN LINE 42 OF .\DELAY.C: 'j': undefined identifier
43 1 for(i=0;i<6;i++)
*** ERROR C202 IN LINE 43 OF .\DELAY.C: 'i': undefined identifier
C51 COMPILER V6.12 DELAY 04/11/2006 11:58:36 PAGE 2
44 1 ;
45 1 }
46 //*************************极短延时****************************************//
47 void shortdelay(Byte count)
*** ERROR C141 IN LINE 47 OF .\DELAY.C: syntax error near 'count', expected ')'
48 {Byte i,j;
*** ERROR C141 IN LINE 48 OF .\DELAY.C: syntax error near 'i'
*** ERROR C202 IN LINE 48 OF .\DELAY.C: 'i': undefined identifier
49 1 for(i=0;i<count;i++)
*** ERROR C202 IN LINE 49 OF .\DELAY.C: 'i': undefined identifier
50 1 for(j=0;j<=140;j++)
*** ERROR C202 IN LINE 50 OF .\DELAY.C: 'j': undefined identifier
51 1 _nop_();
52 1 }
53 //*************************利用定时器的延时****************************************//
54 void timer40msdelay(byte count)
*** ERROR C141 IN LINE 54 OF .\DELAY.C: syntax error near 'count', expected ')'
55 {t40mstimer=count;
*** ERROR C202 IN LINE 55 OF .\DELAY.C: 't40mstimer': undefined identifier
56 1 while(t40mstimer!=0);
*** ERROR C202 IN LINE 56 OF .\DELAY.C: 't40mstimer': undefined identifier
57 1 }
58 void timer1isr_40ms(void)interrupt 3 using 2
59 {TH1=clock_40ms & 0xff;
*** ERROR C202 IN LINE 59 OF .\DELAY.C: 'clock_40ms': undefined identifier
60 1 TL1=clock_40ms >> 8
*** ERROR C202 IN LINE 60 OF .\DELAY.C: 'clock_40ms': undefined identifier
61 1 TF1=0;
*** ERROR C141 IN LINE 61 OF .\DELAY.C: syntax error near 'TF1'
62 1 if(t40mstimer!=0)
*** ERROR C202 IN LINE 62 OF .\DELAY.C: 't40mstimer': undefined identifier
63 1 t40mstimer--;
*** ERROR C202 IN LINE 63 OF .\DELAY.C: 't40mstimer': undefined identifier
64 1 }
C51 COMPILATION COMPLETE. 0 WARNING(S), 25 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -