📄 display_process.lst
字号:
C51 COMPILER V8.05a DISPLAY_PROCESS 09/27/2008 09:32:24 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE DISPLAY_PROCESS
OBJECT MODULE PLACED IN .\hex\display_process.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE src\display_process.c BROWSE INCDIR(.\h) DEBUG OBJECTEXTEND PRINT(.\display
-_process.lst) OBJECT(.\hex\display_process.obj)
line level source
1 #include"reg52.h"
2 #include"intrins.h"
3
4 #include"my_type.h"
5 #include"function.h"
6 #include"global_var.h"
7 #include"interface.h"
8 /********温度值转换处理程序*********/
9 void display_process(float temp)
10 {
11 1
12 1 if(temp>=0 && temp<10) //当温度在0-10摄氏度时
13 1 {
14 2 disp[0]=led[(uchar)(temp)+10];
15 2 disp[1]=led[((uchar)(temp*10))%10];
16 2 disp[2]=led[(uchar)((uint)(temp*100))%10];
17 2 disp[3]=led[(uchar)((uint)(temp*1000)%10)];
18 2 // return 1;
19 2 }
20 1 if(temp>=10 && temp<100) //当温度在10-100摄氏度时
21 1 {
22 2 disp[0]=led[(uchar)(temp/10)];
23 2 disp[1]=led[((uchar)(temp))%10+10];
24 2 disp[2]=led[(uchar)((uint)(temp*10)%10)];
25 2 disp[3]=led[(uchar)((uint)(temp*100)%10)];
26 2 // return 1;
27 2 }
28 1 if(temp>=100 && temp<1000) //当温度在100-1000摄氏度时
29 1 {
30 2 disp[0]=led[(uchar)(temp/100)];
31 2 disp[1]=led[(uchar)(((uint)(temp))%100/10)];
32 2 disp[2]=led[(uchar)(((uint)(temp))%10)+10];
33 2 disp[3]=led[(uchar)((uint)(temp*10)%10)];
34 2 // return 1;
35 2 }
36 1 if(temp>=1000 && temp<10000) //当温度在1000-10000摄氏度时
37 1 {
38 2 disp[0]=led[(uchar)((uint)(temp/1000))];
39 2 disp[1]=led[(uchar)(((uint)(temp))%1000/100)];
40 2 disp[2]=led[(uchar)(((uint)(temp))%100/10)];
41 2 disp[3]=led[(uchar)(((uint)(temp))%10)];
42 2 // return 1;
43 2 }
44 1 if(temp>-10 && temp<=0) //当温度在-10-0摄氏度时
45 1 {
46 2 disp[0]=led[21];
47 2 disp[1]=led[(uchar)((uint)(temp*(-1)))+10];
48 2 disp[2]=led[(uchar)(((uint)(temp*(-1)*10))%10)];
49 2 disp[3]=led[(uchar)(((uint)(temp*(-1)*100))%10)];
50 2 // return 1;
51 2 }
52 1 if(temp>-100 && temp<=-10) //当温度在-100 - -10摄氏度时
53 1 {
54 2 disp[0]=led[21];
C51 COMPILER V8.05a DISPLAY_PROCESS 09/27/2008 09:32:24 PAGE 2
55 2 disp[1]=led[(uchar)(temp*(-1)/10)];
56 2 disp[2]=led[(uchar)(((uint)(temp*(-1)))%10)+10];
57 2 disp[3]=led[(uchar)(((uint)(temp*(-1)*10))%10)];
58 2 // return 1;
59 2 }
60 1
61 1 }
62 void display_set_L()
63 {
64 1 num0=13;
65 1 num1=set_low/100;
66 1 num2=set_low/10%10;
67 1 num3=set_low%10;
68 1 disp[0]=led1[num0];
69 1 disp[1]=led1[num1];
70 1 disp[2]=led1[num2];
71 1 disp[3]=led1[num3];
72 1 }
73
74
75 void display_set_H()
76 {
77 1 num0=12;
78 1 num1=set_high/100;
79 1 num2=set_high/10%10;
80 1 num3=set_high%10;
81 1 disp[0]=led1[num0];
82 1 disp[1]=led1[num1];
83 1 disp[2]=led1[num2];
84 1 disp[3]=led1[num3];
85 1 }
86
87 void display_set_rtc()
88 {
89 1 num0=set_rtc/1000;
90 1 num1=set_rtc/100%10;
91 1 num2=set_rtc%100/10;
92 1 num3=set_rtc%10;
93 1 disp[0]=led1[num0];
94 1 disp[1]=led1[num1];
95 1 disp[2]=led1[num2];
96 1 disp[3]=led1[num3];
97 1 }
*** WARNING C316 IN LINE 97 OF src\display_process.c: unterminated conditionals
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1223 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 4
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 + -