📄 main.lst
字号:
181 2 if(k7==0)
182 2 {
183 3 Delay10ms(1);
184 3 if(k7==0)
185 3 kk7=!kk7;
186 3 }
187 2 if(kk7==0) break;
188 2 Delay10ms(100);
189 2 s--;
190 2 second=0;
191 2 P1=table[s];
192 2 Delay10ms(1);
193 2 second=1;
194 2 }
195 1 kk7=0;
196 1 buzzer=0;
197 1 Delay10ms(100);
198 1 buzzer=1;
199 1
200 1 }
201
202
203
204
205 void main()
206 {
207 1
208 1 EX0=1;
209 1 EA=1;
210 1 PS=0;
211 1 PX0=0;
212 1 buzzer=1;
213 1 tf=0,f=0,ts=0,s=0;
214 1 kk7=0;
215 1 tenfen=0;
216 1 fen=0;
217 1 tens=0;
218 1 second=0;
219 1 P1=0;
220 1 tenfen=1;
221 1 fen=1;
222 1 tens=1;
223 1 second=1;
224 1 Out_4094(disn);
225 1 while(1)
226 1 {
227 2 if(k5==0)
228 2 {
229 3 Delay10ms(1);
230 3 if(k5==0)
231 3 {
232 4 tf++;
233 4 if(tf==10)
234 4 tf=0;
235 4 tenfen=0;
236 4 P1=table[tf];
237 4 Delay10ms(1);
238 4 tenfen=1;
239 4 }
240 3 }
C51 COMPILER V8.02 MAIN 11/28/2007 06:56:50 PAGE 5
241 2 if(k6==0)
242 2 {
243 3 Delay10ms(1);
244 3 if(k6==0)
245 3 {
246 4 f++;
247 4 if(f==10)
248 4 f=0;
249 4 fen=0;
250 4 P1=table[f];
251 4 Delay10ms(1);
252 4 fen=1;
253 4 }
254 3 }
255 2 if(k7==0)
256 2 {
257 3 Delay10ms(1);
258 3 if(k7==0)
259 3 kk7=!kk7;
260 3 }
261 2 if(kk7)
262 2 jishi();
263 2 }
264 1 }
265
266 void timer0(void) interrupt 0
267 {
268 1 uint t=0 ;
269 1 if(k1==0)
270 1 {
271 2 Delay10ms(1);
272 2 if(k1==0)
273 2 {
274 3 disn[1]++;
275 3 if(disn[1]==10)
276 3 {
277 4 disn[2]++;
278 4 disn[1]=0;
279 4 if(disn[2]==10)
280 4 {
281 5 disn[3]++;
282 5 disn[2]=0;
283 5 if(disn[3]==0) disn[3]=0;
284 5 }
285 4 }
286 3 }
287 2 Out_4094(disn);
288 2
289 2 }
290 1 if(k2==0)
291 1 {
292 2 Delay10ms(1);
293 2 if(k2==0)
294 2 {
295 3 disn[1]--;
296 3 if(disn[1]==-1)
297 3 {
298 4 disn[1]=9;
299 4 disn[2]--;
300 4 if(disn[2]==-1)
301 4 {
302 5 disn[2]=9;
C51 COMPILER V8.02 MAIN 11/28/2007 06:56:50 PAGE 6
303 5 disn[3]--;
304 5 if(disn[3]==-1) disn[3]=0;
305 5 }
306 4 }
307 3 }
308 2 Out_4094(disn);
309 2 }
310 1 if(k3==0)
311 1 {
312 2 Delay10ms(1);
313 2 if(k3==0)
314 2 {
315 3 disn[4]++;
316 3 if(disn[4]==10)
317 3 {
318 4 disn[5]++;
319 4 disn[4]=0;
320 4 if(disn[5]==10)
321 4 {
322 5 disn[6]++;
323 5 disn[5]=0;
324 5 if(disn[6]==0) disn[6]=0;
325 5 }
326 4 }
327 3 }
328 2 Out_4094(disn);
329 2
330 2 }
331 1 if(k4==0)
332 1 {
333 2 Delay10ms(1);
334 2 if(k4==0)
335 2 {
336 3 disn[4]--;
337 3 if(disn[4]==-1)
338 3 {
339 4 disn[4]=9;
340 4 disn[5]--;
341 4 if(disn[5]==-1)
342 4 {
343 5 disn[5]=9;
344 5 disn[6]--;
345 5 if(disn[6]==-1) disn[6]=0;
346 5 }
347 4 }
348 3 }
349 2 Out_4094(disn);
350 2 }
351 1
352 1 }
353
354
355
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1217 ----
CONSTANT SIZE = 20 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 49 4
IDATA SIZE = ---- ----
C51 COMPILER V8.02 MAIN 11/28/2007 06:56:50 PAGE 7
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 + -