📄 main.lst
字号:
C51 COMPILER V7.05 MAIN 01/18/2003 17:05:54 PAGE 1
C51 COMPILER V7.05, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include "595.H"
2 #include <stdio.h>
3 #include <reg52.h>
4 #include <intrins.h>
5 #include <string.h>
6 #define MID_LIMT 100
7 #define HIGH_LIMT 350
8 #define Z_PORT 3
9 sbit wdg = P1^0;
10 /****************************************************************************/
11
12
13 void Delay100ms(unsigned char x)
14 {
15 1 unsigned char i,j;
16 1
17 1 while(x-- != 0)
18 1 {wdg =!wdg;
19 2 for (j = 0;j < 114; j++)for (i = 0;i < 88; i++){_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;
20 3 _nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_(
-) ;
21 3 _nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_(
-) ;
22 3 _nop_() ;_nop_() ;_nop_() ;};
23 2 }
24 1 }
25 /***********************/
26 main()
27 {
28 1 unsigned char i,ms[10];
29 1 unsigned int y,x;
30 1 // dog=!dog;
31 1
32 1 IP=0x04;
33 1
34 1 TR0=1;
35 1 IT0=0;
36 1 EX0=0;
37 1 IT1=1;
38 1 EX1=0; //外部中断1开放
39 1 ET0=1;
40 1 ES=0 ; //串口中断打开
41 1 //init_com();
42 1 EA=0;
43 1
44 1 //i=0;
45 1 //SendStr_MAX7219("1234");
46 1 //flash_led();
47 1 // Delay100ms(10);
48 1 while(1)
49 1 {
50 2 wdg =!wdg;
51 2 for(i=0;i<3;i++) //求平均值
52 2 { x=x+read1543(8);
53 3 }
C51 COMPILER V7.05 MAIN 01/18/2003 17:05:54 PAGE 2
54 2 x=x/3;
55 2 if(x>=Z_PORT)
56 2 { x=x-Z_PORT;
57 3 sprintf(ms," %03d",x);
58 3 SendStr_MAX7219(ms);
59 3 } //is +
60 2 else
61 2 { x=Z_PORT-x;
62 3 sprintf(ms,"-%03d",x);
63 3 SendStr_MAX7219(ms);
64 3 }//-
65 2 Delay100ms(1);
66 2
67 2 }
68 1 }
*** WARNING C280 IN LINE 29 OF MAIN.C: 'y': unreferenced local variable
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 208 ----
CONSTANT SIZE = 12 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 15
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -