📄 sfj1.lst
字号:
244 5 }
245 4 else if(flashcount>=20)
246 4 {displaybuf[2]=0x2f;displaybuf[3]=0x3f;displaybuf[4]=0x4f; displaybuf[5]=0x5f; displaybuf[6]=0
-x6f; displaybuf[7]=0x7a;
247 5 flashcount=0;
248 5 }
249 4 if(flashcount%5==0)
250 4 {repeatdisplay();
251 5 for(flashi=0;flashi<16;flashi++)
252 5 write728x(0x14,displaybuf[flashi]);
253 5 }
254 4 TR0=1;
255 4 }
256 3
257 3 inttimer0=0;
258 3 }
259 2 if(presskey==1||oldkeyflag==1)
260 2 {if(presskey==1)
261 3 {keyvalue=read728x(0x13);
262 4 if (keyvalue==0) {keyvalue=36;}
263 4 else if((keyvalue>=9)&&(keyvalue<=11)) numkeyvalue=keyvalue-8;
264 4 else if((keyvalue>=17)&&(keyvalue<=19)) numkeyvalue=keyvalue-13;
265 4 else if((keyvalue>=25)&&(keyvalue<=27)) numkeyvalue=keyvalue-18;
266 4 else if (keyvalue==34) {numkeyvalue=0;}
267 4 if(keyvalue!=35) clearflag=0;
268 4 if ((keyvalue==2)&&(searchflag==0))
269 4 {keyvalue=56; ALARM=1;
270 5 }
271 4 else if ((keyvalue==3)&&(searchflag==0))
272 4 {keyvalue=56; ALARM=1;
273 5 }
274 4 presskey=0; ALARM=0;
275 4 }
276 3 else if(oldkeyflag==1)
277 3 oldkeyflag=0;
278 3
279 3 if(keyvalue==1)
280 3 {pointoff();
281 4
282 4 receivebuf[3]=(uchar)(earnmoneytemp/100000);
283 4 earnmoneytemp=earnmoneytemp-receivebuf[3]*100000;
284 4 receivebuf[4]=(uchar)(earnmoneytemp/10000);
285 4 earnmoneytemp1=(uint)(earnmoneytemp-receivebuf[4]*10000);
286 4 receivebuf[5]=(uchar)(earnmoneytemp1/1000);
287 4 earnmoneytemp1=(ulong)(earnmoneytemp1-receivebuf[5]*1000);
288 4 receivebuf[6]=(uchar)(earnmoneytemp1/100);
289 4 earnmoneytemp1=(ulong)(earnmoneytemp1-receivebuf[6]*100);
290 4 receivebuf[7]=(uchar)(earnmoneytemp1/10);
291 4 receivebuf[8]=(uchar)(earnmoneytemp1%10);
292 4 if(receivebuf[3]==0)
293 4 {receivebuf[3]=0x0f;
294 5 if((receivebuf[5]==0)&&(receivebuf[4]==0)) receivebuf[5]=0x0f;
295 5 if(receivebuf[4]==0) receivebuf[4]=0x0f;
296 5 }
297 4 displaybuf[0]=0x0f; displaybuf[1]=0x1f;
298 4 displaybuf[2]=0x20+receivebuf[3]; displaybuf[3]=0x30+receivebuf[4];
299 4 displaybuf[4]=0x40+receivebuf[5]; displaybuf[5]=0x50+receivebuf[6];
C51 COMPILER V7.50 SFJ1 04/01/2007 13:44:18 PAGE 6
300 4 displaybuf[6]=0x60+receivebuf[7]; displaybuf[7]=0x70+receivebuf[8];
301 4 repeatdisplay();
302 4 for(i=0;i<16;i++)
303 4 write728x(0x14,displaybuf[i]);
304 4 write728x(0x18,0x2f); write728x(0x18,0x6f);
305 4 flashflag=0; searchflag=1;
306 4 }
307 3 else if((keyvalue==2)&&(searchflag==1))
308 3 {oldstatus();
309 4 }
310 3 else if((keyvalue==3)&&(searchflag==1))
311 3 {clearflag=1;
312 4 }
313 3 else if(keyvalue==8)
314 3 {autoled=1; countled=0; kindled=1; f1led=1; f2led=1;
315 4 enablesend=1; SYS_STATE=0;
316 4 displaybuf[0]=0x0d; displaybuf[1]=0x14; displaybuf[2]=0x2f; displaybuf[3]=0x3f;
317 4 displaybuf[4]=0x4f; displaybuf[5]=0x5f; displaybuf[6]=0x6a; displaybuf[7]=0x7f;
318 4 repeatdisplay();
319 4 for(i=0;i<16;i++)
320 4 write728x(0x14,displaybuf[i]);
321 4 pointon();
322 4 machinestatus=4; pointbit=1; totalmoney=0;
323 4 addflag=0; searchflag=0; flagkeyd=0;
324 4 flashflag=1;
325 4
326 4 firstnumflag=1;
327 4 if(workflag==1) {workflag=0; timeflag=1; }
328 4 }
329 3 else if(keyvalue==16)
330 3 {autoled=1; countled=1; kindled=0; f1led=1; f2led=1;
331 4 enablesend=1; SYS_STATE=0;
332 4
333 4 displaybuf[0]=0x0d; displaybuf[1]=0x13; displaybuf[2]=0x2f; displaybuf[3]=0x3f;
334 4 displaybuf[4]=0x4f; displaybuf[5]=0x5f; displaybuf[6]=0x6a; displaybuf[7]=0x7f;
335 4 repeatdisplay();
336 4 for(i=0;i<16;i++)
337 4 write728x(0x14,displaybuf[i]);
338 4 pointon(); flashflag=1;
339 4
340 4 searchflag=0; flagkeyd=0;
341 4
342 4 machinestatus=3;
343 4 if(workflag==1)
344 4 {workflag=0;
345 5 timeflag=1;
346 5 }
347 4 }
348 3
349 3 else if(keyvalue==36)
350 3 {machinestatus=5;
351 4 autoled=0;
352 4 countled=1;
353 4 kindled=1;
354 4 f1led=1;
355 4 f2led=1;
356 4
357 4 enablesend=1;
358 4 flashflag=0;
359 4 SYS_STATE=0;
360 4 flagkeyd=0;
361 4 pointoff();
C51 COMPILER V7.50 SFJ1 04/01/2007 13:44:18 PAGE 7
362 4
363 4 IRcvStr(0xa0,2,&receivebuf,2);
364 4 spendmoney=(uint)(receivebuf[0]*256+receivebuf[1]);
365 4 pointbit=1;
366 4 //behindnum=0;
367 4 firstnumflag=1;
368 4 displaybuf[0]=0x0d; displaybuf[1]=0x15; displaybuf[2]=0x2f;
369 4 dispmoney();
370 4 searchflag=0;
371 4 if(workflag==1)
372 4 {workflag=0;
373 5 timeflag=1;
374 5 }
375 4 }
376 3 else if((keyvalue==20)&&(receiveflag!=3))
377 3 {
378 4
379 4 if(machinestatus==3)
380 4 {flashflag=0;
381 5 pointoff();
382 5 displaybuf[0]=0x0d; displaybuf[1]=0x13; displaybuf[2]=0x2a; displaybuf[3]=0x3f;
383 5 displaybuf[4]=0x4f; displaybuf[5]=0x5f; displaybuf[6]=0x6f; displaybuf[7]=0x7f;
384 5 repeatdisplay();
385 5 for(i=0;i<16;i++)
386 5 write728x(0x14,displaybuf[i]);
387 5 enableauto=1;
388 5 }
389 4 else if((machinestatus==4)&&(flashflag==0))
390 4 {
391 5 numkey();
392 5 }
393 4 }
394 3 else if(keyvalue==12)
395 3 {if(searchflag==1)
396 4 {oldstatus();
397 5 searchflag=0;
398 5 }
399 4 if((cancelstatus==1)&&(flashflag==0))
400 4 {pointoff();
401 5 displaybuf[3]=havemoney/10000;
402 5 displaybuf[4]=(havemoney-displaybuf[3]*10000)/1000;
403 5 displaybuf[5]=(havemoney-displaybuf[3]*10000-displaybuf[4]*1000)/100;
404 5 displaybuf[6]=(havemoney-displaybuf[3]*10000-displaybuf[4]*1000-displaybuf[5]*100)/10;
405 5 displaybuf[7]=havemoney%10;
406 5 if((displaybuf[3]==0)&&(displaybuf[4]==0)) displaybuf[4]=0x0f;
407 5 if(displaybuf[3]==0) displaybuf[3]=0x0f;
408 5 write728x(0x18,0x2f); write728x(0x18,0x6f);
409 5 displaybuf[3]=0x30+displaybuf[3]; displaybuf[4]=0x40+displaybuf[4]; displaybuf[5]=0x50+displayb
-uf[5];
410 5 displaybuf[6]=0x60+displaybuf[6]; displaybuf[7]=0x70+displaybuf[7];
411 5 repeatdisplay();
412 5 for(i=0;i<16;i++)
413 5 write728x(0x14,displaybuf[i]);
414 5 cancelstatus=0;
415 5 pointbit=1;
416 5
417 5 firstnumflag=1;
418 5 kindmoney=0;
419 5 totalmoney=0;
420 5 receivebuf[4]=0;
421 5
422 5 }
C51 COMPILER V7.50 SFJ1 04/01/2007 13:44:18 PAGE 8
423 4 else if((cancelstatus==0)&&(flashflag==0))
424 4 {
425 5 havemoney=0;
426 5 searchflag=0;
427 5 workflag=0;
428 5 if(machinestatus==3)
429 5 {displaybuf[0]=0x0d; displaybuf[1]=0x13; displaybuf[2]=0x2f; displaybuf[3]=0x3f;
430 6 repeatdisplay();
431 6 for(i=0;i<16;i++)
432 6 write728x(0x14,displaybuf[i]);
433 6 enableauto=0;
434 6 kindmoney=0;
435 6 timeflag=1;
436 6 receiveflag=0;
437 6 }
438 5 else if((machinestatus==4)&&(flagkeyd==0))
439 5 {displaybuf[0]=0x0d;
440 6
441 6 displaybuf[1]=0x14;
442 6 pointbit=1;
443 6
444 6 displaybuf[2]=0x2f; displaybuf[3]=0x3f; displaybuf[4]=0x4f; displaybuf[5]=0x5f;
445 6 displaybuf[6]=0x6f; displaybuf[7]=0x7f;
446 6 repeatdisplay();
447 6 for(i=0;i<16;i++)
448 6 write728x(0x14,displaybuf[i]);
449 6 flashflag=1;
450 6
451 6 for(j=0;j<8;j++)
452 6 {write728x(0x18,pointonvalue[j]);
453 7 }
454 6
455 6 firstnumflag=1;
456 6 receiveflag=0;
457 6 timeflag=1;
458 6 }
459 5
460 5
461 5 }
462 4
463 4 if(machinestatus==5)
464 4 {pointoff();
465 5 pointbit=1;
466 5
467 5 firstnumflag=1;
468 5 IRcvStr(0xa0,2,&receivebuf,2);
469 5 spendmoney=(uint)(receivebuf[0]*256+receivebuf[1]);
470 5 dispmoney();
471 5 }
472 4 }
473 3 else if(keyvalue==35)
474 3 {if((machinestatus==4)&&(countok==1))
475 4 {
476 5 inputmoney();
477 5 inputdata[inputpoint]=setmoney;
478 5 if(inputpoint==0)
479 5 {totalmoney=setmoney;
480 6 }
481 5 else
482 5 {
483 6 for(i=0;i<=inputpoint;i++)
484 6 {if(inputdata[i]==1)
C51 COMPILER V7.50 SFJ1 04/01/2007 13:44:18 PAGE 9
485 7 {inputdata[i+1]=inputdata[i+1]/100;
486 8 inputdata[i-1]=inputdata[i-1]*inputdata[i+1];
487 8 for(j=i;j<=inputpoint;j++)
488 8 inputdata[j]=inputdata[j+2];
489 8 inputpoint=inputpoint-2;
490 8 }
491 7 }
492 6 for(i=0;i<=inputpoint;i++)
493 6 {totalmoney=totalmoney+inputdata[i];
494 7 }
495 6 spendmoney=totalmoney;
496 6 dispmoney();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -