📄 main.lst
字号:
240 3 }
C51 COMPILER V7.01 MAIN 03/08/2007 12:09:35 PAGE 5
241 2 }
242 1
243 1 if(secondsflag)
244 1 {
245 2 EA=0;
246 2 secondsflag=0;
247 2 i=seconds;
248 2 seconds=0;
249 2 EA=1;
250 2 for(;i;i--)
251 2 {
252 3
253 3 checkbeepon();
254 3 checkdooron();
255 3 checkalarmon();
256 3 checkttl1on();
257 3 checkttl2on();
258 3 checkcontactover();
259 3
260 3
261 3
262 3 datetime[DTSEC]++;
263 3 if(datetime[DTSEC]>=60)
264 3 {
265 4 datetime[DTSEC]=0;
266 4 datetime[DTMIN]++;
267 4 if(datetime[DTMIN]>=60)
268 4 {
269 5 datetime[DTMIN]=0;
270 5 datetime[DTHUR]++;
271 5 if(datetime[DTHUR]>=24)
272 5 {
273 6 getdatetime();
274 6 break;
275 6 }
276 5 }
277 4 }
278 3 }
279 2 displaytime();
280 2 }
281 1 if(rxd0flag)
282 1 {
283 2 if((timerh-rxd0timer)>=TRXD0WAITTIME)
284 2 {
285 3 rxd0flag=0;
286 3 rxd1flag=0;
287 3 //rxd0counter=0;
288 3 }
289 2 }
290 1 if(removeeventflag||removeuserflag)
291 1 {
292 2 if((timerh-getpcoktimer)>TWAITPCOKTIME)
293 2 {
294 3 removeeventflag=0;
295 3 removeuserflag=0;
296 3 }
297 2 }
298 1
299 1 if(setflag)
300 1 {
301 2 if(submenuflag)
302 2 {
C51 COMPILER V7.01 MAIN 03/08/2007 12:09:35 PAGE 6
303 3 if(setupitem==SETINTEST)
304 3 {
305 4 if((timerh-refreshtimer)>TREFRESHTIME1)
306 4 {
307 5 refreshtimer=timerh;
308 5 setintestdisp();
309 5 }
310 4 }
311 3 }
312 2 }
313 1 }
314 ///////////////////////////////////////////////////////////////////////////////////////////
315
316 void main()
317 {
318 1 //unsigned char tempdata;
319 1 //init_sys(12);
320 1 //init_lcd();
321 1 //init_figure();
322 1 SP=0XC0;
323 1 init_var();
324 1 init_sys();
325 1 //EA=1;
326 1
327 1 init_all();
328 1
329 1
330 1 //sram_write(0,0,0x55);
331 1 //tempdata=sram_read(0,0);
332 1 //keyscan();
333 1 //rxddeal();
334 1
335 1 while(1)
336 1 {
337 2
338 2 //keyack();
339 2 //keyscan();
340 2
341 2 if(keydownflag)
342 2 {
343 3 keydownflag=0;
344 3 if(!keytype)
345 3 {
346 4 keyfun();
347 4 }
348 3 else
349 3 {
350 4 if((!idinflag)&&(!passinflag))
351 4 {
352 5 if(!setflag)
353 5 {
354 6 set_373(BEEPPORT);
355 6 delay60ms();
356 6 clr_373(BEEPPORT);
357 6 hex2bcd((keynumber<<8)|cardnumhigh);
358 6 idata2idata(tempbuff,keybuff,5);
359 6 keynumber=ENTER;
360 6 keycounter=5;
361 6 idinflag=1;
362 6 enterfun();
363 6 }
364 5 else
C51 COMPILER V7.01 MAIN 03/08/2007 12:09:35 PAGE 7
365 5 {
366 6 if(setupitem==SETIDREGISTER)
367 6 {
368 7 if(submenuflag)
369 7 {
370 8 if(!submenu1flag)
371 8 {
372 9 set_373(BEEPPORT);
373 9 delay60ms();
374 9 clr_373(BEEPPORT);
375 9 hex2bcd((keynumber<<8)|cardnumhigh);
376 9 dispbuff[LINE2][KEYINSTARTP]=tempbuff[0]+0x30;
377 9 dispbuff[LINE2][KEYINSTARTP+1]=tempbuff[1]+0x30;
378 9 dispbuff[LINE2][KEYINSTARTP+2]=tempbuff[2]+0x30;
379 9 dispbuff[LINE2][KEYINSTARTP+3]=tempbuff[3]+0x30;
380 9 dispbuff[LINE2][KEYINSTARTP+4]=tempbuff[4]+0x30;
381 9 keynumber=ENTER;
382 9 setcount=5;
383 9 numberfun();
384 9 }
385 8 }
386 7 }
387 6 else if(setupitem==SETMASTERCHANGE)
388 6 {
389 7 if(submenuflag)
390 7 {
391 8 if(!submenu1flag)
392 8 {
393 9 set_373(BEEPPORT);
394 9 delay60ms();
395 9 clr_373(BEEPPORT);
396 9 hex2bcd((keynumber<<8)|cardnumhigh);
397 9 dispbuff[LINE2][KEYINSTARTP]=tempbuff[0]+0x30;
398 9 dispbuff[LINE2][KEYINSTARTP+1]=tempbuff[1]+0x30;
399 9 dispbuff[LINE2][KEYINSTARTP+2]=tempbuff[2]+0x30;
400 9 dispbuff[LINE2][KEYINSTARTP+3]=tempbuff[3]+0x30;
401 9 dispbuff[LINE2][KEYINSTARTP+4]=tempbuff[4]+0x30;
402 9 keynumber=ENTER;
403 9 setcount=5;
404 9 numberfun();
405 9
406 9 }
407 8 }
408 7 }
409 6 else if(setupitem==SETIDDELETE)
410 6 {
411 7 if(submenuflag)
412 7 {
413 8 if(!submenu1flag)
414 8 {
415 9 set_373(BEEPPORT);
416 9 delay60ms();
417 9 clr_373(BEEPPORT);
418 9 hex2bcd((keynumber<<8)|cardnumhigh);
419 9 dispbuff[LINE2][KEYINSTARTP]=tempbuff[0]+0x30;
420 9 dispbuff[LINE2][KEYINSTARTP+1]=tempbuff[1]+0x30;
421 9 dispbuff[LINE2][KEYINSTARTP+2]=tempbuff[2]+0x30;
422 9 dispbuff[LINE2][KEYINSTARTP+3]=tempbuff[3]+0x30;
423 9 dispbuff[LINE2][KEYINSTARTP+4]=tempbuff[4]+0x30;
424 9 keynumber=ENTER;
425 9 setcount=5;
426 9 numberfun();
C51 COMPILER V7.01 MAIN 03/08/2007 12:09:35 PAGE 8
427 9 }
428 8 }
429 7 }
430 6 else if(setupitem==SETREADERTEST)
431 6 {
432 7 if(submenuflag)
433 7 {
434 8 set_373(BEEPPORT);
435 8 delay60ms();
436 8 clr_373(BEEPPORT);
437 8 displaymessage(LMHHHHHHHH,LINE2);
438 8 hex2bcd((keynumber<<8)|cardnumhigh);
439 8 dispbuff[LINE2][KEYINSTARTP]=tempbuff[0]+0x30;
440 8 dispbuff[LINE2][KEYINSTARTP+1]=tempbuff[1]+0x30;
441 8 dispbuff[LINE2][KEYINSTARTP+2]=tempbuff[2]+0x30;
442 8 dispbuff[LINE2][KEYINSTARTP+3]=tempbuff[3]+0x30;
443 8 dispbuff[LINE2][KEYINSTARTP+4]=tempbuff[4]+0x30;
444 8 display(LINE2);
445 8
446 8 if(keytype==KEYTYPEREADER1)
447 8 {
448 9 displaymessage(LMREADER1,LINE1);
449 9 }
450 8 else
451 8 {
452 9 displaymessage(LMREADER2,LINE1);
453 9 }
454 8 delayTimerh(TMSGWAITTIME);
455 8 displaymessage(LMBLANK,LINE1);
456 8 displaymessage(LMSCANID,LINE2);
457 8 }
458 7 }
459 6 }
460 5 }
461 4 }
462 3 }
463 2 if(rxd0packflag)
464 2 {
465 3 rxd0packflag=0;
466 3 deal_pccomm();
467 3 //deal_finger();
468 3 }
469 2
470 2 cover();
471 2 tamperchk();
472 2 aux1chk();
473 2 aux2chk();
474 2 contactchk();
475 2 exitchk();
476 2 exitchk();
477 2
478 2 }
479 1 }
480 ///////////////////////////////////////////////////////////////////////////////////////////
481
C51 COMPILER V7.01 MAIN 03/08/2007 12:09:35 PAGE 9
ASSEMBLY LISTING OF GENERATED OBJECT CODE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -