📄 display.lst
字号:
C51 COMPILER V6.12 DISPLAY 06/02/2005 10:56:59 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE DISPLAY
OBJECT MODULE PLACED IN .\DISPLAY.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE .\DISPLAY.C DEBUG OBJECTEXTEND
stmt level source
1 #include "public.h"
2
3 void insel_lamp(void)
4 {
5 1 if(m_cInSelAllOffFlg==1){
6 2 m_cInSelLamp[0]=0x00;
7 2 m_cInSelLamp[1]=0x00;
8 2 m_cInSelLamp[2]=0x00;
9 2 m_cInSelAllOffFlg=0;
10 2 }
11 1 XBYTE[((P2&0x60)|0x94)*256]=m_cInSelLamp[0];
12 1 XBYTE[((P2&0x60)|0x95)*256]=m_cInSelLamp[1];
13 1 XBYTE[((P2&0x60)|0x96)*256]=m_cInSelLamp[2];
14 1 P2=(P2&0x60)|0x9f;
15 1 }
16
17 void advancedoutput(void)
18 {
19 1 uchar cTemp=0;
20 1 //超载灯
21 1 if(m_cOverLoadLampFlg==1){
22 2 P2_6=1;
23 2 }else if(m_cOverLoadLampFlg==0){
24 2 P2_6=0;
25 2 }
26 1 //到站钟
27 1 if(m_cArriveRingFlg==1){
28 2 P2_5=1;
29 2 }else if(m_cArriveRingFlg==0){ //(实际上,不可能执行到)
30 2
31 2 }
32 1 if(/*(m_cArriveRingFlg==1)&&*/(time_arrive2s_flg==1)){ //到站钟保持时间到
33 2 P2_5=0;
34 2 m_cArriveRingFlg=0;
35 2 time_arrive2s_flg=0;
36 2 time_arrive2s_count=TIMER_2s;
37 2 }
38 1
39 1 //蜂鸣器(间隔2秒,响一次)
40 1 cTemp=P1_1;
41 1 if(m_cBingFlg==1){
42 2 P1_1=1;
43 2 }else if(m_cBingFlg==0){ //确保停止响铃
44 2
45 2 }
46 1 if(time_bing2s_flg==1){
47 2 time_bing2s_flg=0;
48 2 time_bing2s_count=TIMER_2s;
49 2 m_cBingFlg=0;
50 2 P1_1=0;
51 2 }
52 1 }
53
54
55 void chkcan(void) //can总线正在通讯状态和通讯错误状态显示灯赋值片断。
C51 COMPILER V6.12 DISPLAY 06/02/2005 10:56:59 PAGE 2
56 {
57 1 if((XBYTE[((P2&0xe0)|0x0F)*256+2]&0x80)==0x80) //总线状态为关闭时
58 1 {P3_1=0;
59 2 /*
60 2 P2_7=0;
61 2 _nop_();
62 2 _nop_();
63 2 _nop_();
64 2 _nop_();
65 2 _nop_();
66 2 _nop_();
67 2 _nop_();
68 2 _nop_();
69 2 _nop_();
70 2 _nop_();
71 2 _nop_();
72 2 _nop_();
73 2
74 2 P2_7=1;
75 2 */
76 2 can_init();
77 2 }
78 1 if((XBYTE[((P2&0xe0)|0x0F)*256]&0x01)!=0x00) //总线状态为复位时
79 1 {P3_1=0;
80 2 /*
81 2 P2_7=0;
82 2 _nop_();
83 2 _nop_();
84 2 _nop_();
85 2 _nop_();
86 2 _nop_();
87 2 _nop_();
88 2 _nop_();
89 2 _nop_();
90 2 _nop_();
91 2 _nop_();
92 2 _nop_();
93 2 _nop_();
94 2
95 2 P2_7=1;
96 2 */
97 2 can_init();
98 2 }
99 1 if((XBYTE[((P2&0xe0)|0x0F)*256+2]&0x40)==0x40) //错误寄存器为1时
100 1 {P3_1=0;
101 2 /*
102 2 P2_7=0;
103 2 _nop_();
104 2 _nop_();
105 2 _nop_();
106 2 _nop_();
107 2 _nop_();
108 2 _nop_();
109 2 _nop_();
110 2 _nop_();
111 2 _nop_();
112 2 _nop_();
113 2 _nop_();
114 2 _nop_();
115 2
116 2 P2_7=1;
117 2 */
C51 COMPILER V6.12 DISPLAY 06/02/2005 10:56:59 PAGE 3
118 2 can_init();
119 2 }
120 1 else
121 1 {P3_1=1;
122 2 }
123 1
124 1 if((XBYTE[((P2&0xe0)|0x0F)*256+2]&0x02)==0x02){ //数据溢出
125 2 P3_1=0;
126 2 /*
127 2 P2_7=0;
128 2 _nop_();
129 2 _nop_();
130 2 _nop_();
131 2 _nop_();
132 2 _nop_();
133 2 _nop_();
134 2 _nop_();
135 2 _nop_();
136 2 _nop_();
137 2 _nop_();
138 2 _nop_();
139 2 _nop_();
140 2
141 2 P2_7=1;
142 2 */
143 2 can_init();
144 2 }
145 1
146 1 if(((XBYTE[((P2&0xe0)|0x0F)*256+2]&0x20)==0x20)||((XBYTE[((P2&0xe0)|0x0F)*256+2]&0x10)==0x10))//正在发送
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -