Lcd_auto.lst
上传用户:xmyjxjd
上传日期:2013-05-04
资源大小:1517k
文件大小:350k
- 2477 3 if (ERROR_SUCCEED != Measure_Color(Color, COLOR_MIN)) return ERROR_ABORT;
- 2478 3 Margin = Data[0];
- 2479 3
- 2480 3 if (0x0a < Margin)
- 2481 3 {
- 2482 4 Change_ADC_Offset(Color, 0x08, 0); // Increase Offset; Decrease Brightness
- 2483 4 }
- 2484 3 else if (0x02 < Margin)
- 2485 3 {
- 2486 4 Change_ADC_Offset(Color, Margin - 0x02, 0); // Increase Offset; Decrease Brightness
- 2487 4 }
- 2488 3 else if (0x02 > Margin)
- 2489 3 {
- 2490 4 if (0x00 == Margin && 0 == FineTune)
- 2491 4 Change_ADC_Offset(Color, 0x06, 1); // Decrease Offset; Increase Brightnes
- -s
- 2492 4 else
- 2493 4 Change_ADC_Offset(Color, 0x02 - Margin, 1); // Decrease Offset; Increase Brightnes
- -s
- 2494 4
- 2495 4 }
- 2496 3 else if (0xf2 == Result)
- 2497 3 {
- 2498 4 break;
- 2499 4 }
- 2500 3
- 2501 3 // Prevent redundant fine tune
- 2502 3 if (8 < Count && 0xf3 >= Result && 0xf1 <= Result && 0x03 >= Margin && 0x01 <= Margin)
- 2503 3 {
- 2504 4 FineTune = 1;
- 2505 4 Count = 8;
- 2506 4 }
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 42
- 2507 3 #endif
- 2508 3
- 2509 3 #if(0)
- ///////////////////////////////
- // Maximum Adjustment (0xfd) //
- ///////////////////////////////
- if (ERROR_SUCCEED != Measure_Color(Color, COLOR_MAX)) return ERROR_ABORT;
- Margin = Data[0];
-
- if (0xfd < Margin)
- {
- Result = (0xff == Margin && 0 == FineTune) ? 0x06 : Margin - 0xfd;
-
- // Non-zero return value of Change_ADC_Gain() means ADC gain reaches maximum.
- if (Change_ADC_Gain(Color, Result, 0)) // Increase Gain; Decrease Contrast
- {
- if (Change_ADC_Offset(Color, 4, 0)) break; // Increase Offset; Decrease Brightnes
- -s
- }
- }
- else if (0xfd > Margin)
- {
- Result = (0xf1 > Margin) ? 0x0c : 0xfd - Margin;
-
- // Non-zero return value of Change_ADC_Gain() means ADC gain reaches minimum.
- if (Change_ADC_Gain(Color, Result, 1)) // Decrease Gain; Increase Contrast
- {
- if (Change_ADC_Offset(Color, 4, 1)) break; // Decrease Offset; Increase Brightnes
- -s
- }
- }
-
- Result = Margin;
-
- ///////////////////////////////
- // Minimum Adjustment (0x02) //
- ///////////////////////////////
-
- if (ERROR_SUCCEED != Measure_Color(Color, COLOR_MIN)) return ERROR_ABORT;
- Margin = Data[0];
-
- if (0x0a < Margin)
- {
- Change_ADC_Offset(Color, 0x08, 0); // Increase Offset; Decrease Brightness
- }
- else if (0x02 < Margin)
- {
- Change_ADC_Offset(Color, Margin - 0x02, 0); // Increase Offset; Decrease Brightness
- }
- else if (0x02 > Margin)
- {
- if (0x00 == Margin && 0 == FineTune)
- Change_ADC_Offset(Color, 0x06, 1); // Decrease Offset; Increase Brightnes
- -s
- else
- Change_ADC_Offset(Color, 0x02 - Margin, 1); // Decrease Offset; Increase Brightnes
- -s
- }
- else if (0xfd == Result)
- {
- break;
- }
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 43
-
- // Prevent redundant fine tune
- if (8 < Count && 0xfe >= Result && 0xfc <= Result && 0x03 >= Margin && 0x01 <= Margin)
- {
- FineTune = 1;
- Count = 8;
- }
- #endif
- 2573 3
- 2574 3 }
- 2575 2 while (--Count);
- 2576 2
- 2577 2 Color = Color >> 1;
- 2578 2 }
- 2579 1 while (Color);
- 2580 1
- 2581 1 #if(ANALOG_CONTRAST)
- 2582 1 stGUD0.CONTRAST = ucTemp;
- 2583 1 SetADC_Gain();
- 2584 1 #endif
- 2585 1 return ERROR_SUCCEED;
- 2586 1 }
- 2587
- 2588 unsigned char Measure_Color(unsigned char color, unsigned char margin)
- 2589 {
- 2590 1 RTDSetByte(MARGIN_B_7D, (SELECT_RED == color) ? COLORS_RED : (SELECT_GREEN == color) ? COLORS_GREEN :
- -COLORS_BLUE);
- 2591 1
- 2592 1
- 2593 1 Data[0] = 9;
- 2594 1 Data[1] = Y_INC;
- 2595 1 Data[2] = H_BND_STA_L_75;
- 2596 1
- 2597 1 Data[3] = (unsigned char)(usH_Start + MEAS_H_STA_OFFSET - 1);
- 2598 1 Data[4] = (unsigned char)(usH_End + MEAS_H_END_OFFSET);
- 2599 1 Data[5] = ((unsigned char)((usH_Start + MEAS_H_STA_OFFSET - 1) >> 4) & 0x70) | ((unsigned char)((usH_E
- -nd + MEAS_H_END_OFFSET) >> 8) & 0x0f);
- 2600 1
- 2601 1 if (COLOR_MIN == margin)
- 2602 1 {
- 2603 2 Data[3] = 0x80;
- 2604 2 Data[4] = 0x00;
- 2605 2 Data[5] = 0x12;
- 2606 2
- 2607 2 Data[6] = 9 < usVer_Start ? 9 : usVer_Start - 1;
- 2608 2 Data[7] = Data[6] + 1;
- 2609 2 Data[8] = 0;
- 2610 2 }
- 2611 1 else
- 2612 1 {
- 2613 2 Data[6] = (unsigned char)(usVer_Start + 1);
- 2614 2 Data[7] = (unsigned char)(usVer_End + 1);
- 2615 2 Data[8] = ((unsigned char)((usVer_Start + 1) >> 4) & 0x70) | ((unsigned char)((usVer_End + 1) >> 8
- -) & 0x0f);
- 2616 2 }
- 2617 1
- 2618 1 Data[9] = 0;
- 2619 1 RTDWrite(Data);
- 2620 1
- 2621 1 if (COLOR_MIN == margin)
- 2622 1 RTDSetByte(AUTO_ADJ_CTRL_7F, COLOR_MIN | 0x01); // Start the auto-adjust
- 2623 1 else
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 44
- 2624 1 RTDSetByte(AUTO_ADJ_CTRL_7F, COLOR_MAX | 0x01); // Start the auto-adjust
- 2625 1
- 2626 1 Wait_Finish();
- 2627 1
- 2628 1 if (ERROR_SUCCEED != Data[0]) return ERROR_ABORT;
- 2629 1
- 2630 1 RTDRead(AUTO_BAL_RESULT_88, 1, N_INC); // Store result in Data[0]
- 2631 1
- 2632 1 if (COLOR_MIN == margin) Data[0] ^= 0xff;
- 2633 1
- 2634 1
- 2635 1
- 2636 1 return ERROR_SUCCEED;
- 2637 1 }
- 2638
- 2639 unsigned char Change_ADC_Gain(unsigned char color, unsigned char delta, unsigned char inc)
- 2640 {
- 2641 1 if (inc)
- 2642 1 {
- 2643 2 inc = 0;
- 2644 2
- 2645 2 if (color & SELECT_RED)
- 2646 2 {
- 2647 3 if (stGUD2.AD_R_GAIN > delta)
- 2648 3 stGUD2.AD_R_GAIN -= delta;
- 2649 3 else
- 2650 3 {
- 2651 4 stGUD2.AD_R_GAIN = 0;
- 2652 4 inc |= SELECT_RED;
- 2653 4 }
- 2654 3 }
- 2655 2 if (color & SELECT_GREEN)
- 2656 2 {
- 2657 3 if (stGUD2.AD_G_GAIN > delta)
- 2658 3 stGUD2.AD_G_GAIN -= delta;
- 2659 3 else
- 2660 3 {
- 2661 4 stGUD2.AD_G_GAIN = 0;
- 2662 4 inc |= SELECT_GREEN;
- 2663 4 }
- 2664 3 }
- 2665 2 if (color & SELECT_BLUE)
- 2666 2 {
- 2667 3 if (stGUD2.AD_B_GAIN > delta)
- 2668 3 stGUD2.AD_B_GAIN -= delta;
- 2669 3 else
- 2670 3 {
- 2671 4 stGUD2.AD_B_GAIN = 0;
- 2672 4 inc |= SELECT_BLUE;
- 2673 4 }
- 2674 3 }
- 2675 2 }
- 2676 1 else
- 2677 1 {
- 2678 2 if (color & SELECT_RED)
- 2679 2 {
- 2680 3 if ((0xff - stGUD2.AD_R_GAIN) > delta)
- 2681 3 stGUD2.AD_R_GAIN += delta;
- 2682 3 else
- 2683 3 {
- 2684 4 stGUD2.AD_R_GAIN = 0xff;
- 2685 4 inc |= SELECT_RED;
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 45
- 2686 4 }
- 2687 3 }
- 2688 2 if (color & SELECT_GREEN)
- 2689 2 {
- 2690 3 if ((0xff - stGUD2.AD_G_GAIN) > delta)
- 2691 3 stGUD2.AD_G_GAIN += delta;
- 2692 3 else
- 2693 3 {
- 2694 4 stGUD2.AD_G_GAIN = 0xff;
- 2695 4 inc |= SELECT_GREEN;
- 2696 4 }
- 2697 3 }
- 2698 2 if (color & SELECT_BLUE)
- 2699 2 {
- 2700 3 if ((0xff - stGUD2.AD_B_GAIN) > delta)
- 2701 3 stGUD2.AD_B_GAIN += delta;
- 2702 3 else
- 2703 3 {
- 2704 4 stGUD2.AD_B_GAIN = 0xff;
- 2705 4 inc |= SELECT_BLUE;
- 2706 4 }
- 2707 3 }
- 2708 2 }
- 2709 1
- 2710 1 SetADC_Gain();
- 2711 1
- 2712 1 return inc;
- 2713 1 }
- 2714
- 2715 unsigned char Change_ADC_Offset(unsigned char color, unsigned char delta, unsigned char inc)
- 2716 {
- 2717 1 if (inc)
- 2718 1 {
- 2719 2 inc = 0;
- 2720 2
- 2721 2 if (color & SELECT_RED)
- 2722 2 {
- 2723 3 if (stGUD2.AD_R_OFFSET > delta)
- 2724 3 stGUD2.AD_R_OFFSET = stGUD2.AD_R_OFFSET - delta;
- 2725 3 else
- 2726 3 {
- 2727 4 stGUD2.AD_R_OFFSET = 0;
- 2728 4 inc |= SELECT_RED;
- 2729 4 }
- 2730 3 }
- 2731 2 if (color & SELECT_GREEN)
- 2732 2 {
- 2733 3 if (stGUD2.AD_G_OFFSET > delta)
- 2734 3 stGUD2.AD_G_OFFSET = stGUD2.AD_G_OFFSET - delta;
- 2735 3 else
- 2736 3 {
- 2737 4 stGUD2.AD_G_OFFSET = 0;
- 2738 4 inc |= SELECT_GREEN;
- 2739 4 }
- 2740 3 }
- 2741 2 if (color & SELECT_BLUE)
- 2742 2 {
- 2743 3 if (stGUD2.AD_B_OFFSET > delta)
- 2744 3 stGUD2.AD_B_OFFSET = stGUD2.AD_B_OFFSET - delta;
- 2745 3 else
- 2746 3 {
- 2747 4 stGUD2.AD_B_OFFSET = 0;
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 46
- 2748 4 inc |= SELECT_BLUE;
- 2749 4 }
- 2750 3 }
- 2751 2 }
- 2752 1 else
- 2753 1 {
- 2754 2 if (color & SELECT_RED)
- 2755 2 {
- 2756 3 if ((0xff - delta) > stGUD2.AD_R_OFFSET)
- 2757 3 stGUD2.AD_R_OFFSET = stGUD2.AD_R_OFFSET + delta;
- 2758 3 else
- 2759 3 {
- 2760 4 stGUD2.AD_R_OFFSET = 0xff;
- 2761 4 inc |= SELECT_RED;
- 2762 4 }
- 2763 3
- 2764 3 }
- 2765 2 if (color & SELECT_GREEN)
- 2766 2 {
- 2767 3 if ((0xff - delta) > stGUD2.AD_G_OFFSET)
- 2768 3 stGUD2.AD_G_OFFSET = stGUD2.AD_G_OFFSET + delta;
- 2769 3 else
- 2770 3 {
- 2771 4 stGUD2.AD_G_OFFSET = 0xff;
- 2772 4 inc |= SELECT_GREEN;
- 2773 4 }
- 2774 3
- 2775 3 }
- 2776 2 if (color & SELECT_BLUE)
- 2777 2 {
- 2778 3 if ((0xff - delta) > stGUD2.AD_B_OFFSET)
- 2779 3 stGUD2.AD_B_OFFSET = stGUD2.AD_B_OFFSET + delta;
- 2780 3 else
- 2781 3 {
- 2782 4 stGUD2.AD_B_OFFSET = 0xff;
- 2783 4 inc |= SELECT_BLUE;
- 2784 4 }
- 2785 3 }
- 2786 2 }
- 2787 1
- 2788 1 SetADC_Offset();
- 2789 1
- 2790 1 return inc;
- 2791 1 }
- 2792
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 47
- ASSEMBLY LISTING OF GENERATED OBJECT CODE
- ; FUNCTION Com016F (BEGIN)
- 0000 L?0368:
- 0000 7800 R MOV R0,#LOW usH_End+01H
- 0002 E6 MOV A,@R0
- 0003 2401 ADD A,#01H
- 0005 FF MOV R7,A
- 0006 18 DEC R0
- 0007 E4 CLR A
- 0008 36 ADDC A,@R0
- 0009 FE MOV R6,A
- 000A C3 CLR C
- 000B EF MOV A,R7
- 000C 18 DEC R0
- 000D 96 SUBB A,@R0
- 000E FF MOV R7,A
- 000F EE MOV A,R6
- 0010 18 DEC R0
- 0011 96 SUBB A,@R0
- 0012 FE MOV R6,A
- 0013 7800 R MOV R0,#LOW usH_End
- 0015 F6 MOV @R0,A
- 0016 08 INC R0
- 0017 EF MOV A,R7
- 0018 F6 MOV @R0,A
- 0019 7800 E MOV R0,#LOW usIPH_ACT_WID
- 001B L?0369:
- 001B E6 MOV A,@R0
- 001C FC MOV R4,A
- 001D 08 INC R0
- 001E E6 MOV A,@R0
- 001F FD MOV R5,A
- 0020 C3 CLR C
- 0021 EF MOV A,R7
- 0022 9D SUBB A,R5
- 0023 EE MOV A,R6
- 0024 9C SUBB A,R4
- 0025 22 RET
- 0026 L?0371:
- 0026 L?0372:
- 0026 FF MOV R7,A
- 0027 18 DEC R0
- 0028 E4 CLR A
- 0029 36 ADDC A,@R0
- 002A C4 SWAP A
- 002B F8 MOV R0,A
- 002C 54F0 ANL A,#0F0H
- 002E C8 XCH A,R0
- 002F EF MOV A,R7
- 0030 L?0373:
- 0030 C4 SWAP A
- 0031 540F ANL A,#0FH
- 0033 48 ORL A,R0
- 0034 5470 ANL A,#070H
- 0036 22 RET
- 0037 L?0374:
- 0037 E500 E MOV A,Data+01H
- 0039 540F ANL A,#0FH
- 003B F500 E MOV Data+02H,A
- 003D 850000 E MOV Data+03H,Data
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 48
- 0040 E500 E MOV A,stMUD+02H
- 0042 7800 E MOV R0,#LOW usADC_Clock+01H
- 0044 L?0375:
- 0044 26 ADD A,@R0
- 0045 FF MOV R7,A
- 0046 E4 CLR A
- 0047 18 DEC R0
- 0048 36 ADDC A,@R0
- 0049 CF XCH A,R7
- 004A 2480 ADD A,#080H
- 004C 22 RET
- 004D L?0376:
- 004D L?0377:
- 004D AF00 E MOV R7,Data+07H
- 004F AE00 E MOV R6,Data+06H
- 0051 AD00 E MOV R5,Data+05H
- 0053 AC00 E MOV R4,Data+04H
- 0055 22 RET
- 0056 L?0378:
- 0056 E4 CLR A
- 0057 FF MOV R7,A
- 0058 FE MOV R6,A
- 0059 FD MOV R5,A
- 005A FC MOV R4,A
- 005B L?0379:
- 005B 7800 R MOV R0,#LOW ulTemp0
- 005D 120000 E LCALL ?C?LLDIDATA0
- 0060 C3 CLR C
- 0061 020000 E LJMP ?C?ULCMP
- 0064 L?0380:
- 0064 E9 MOV A,R1
- 0065 2D ADD A,R5
- 0066 FF MOV R7,A
- 0067 E4 CLR A
- 0068 3C ADDC A,R4
- 0069 CF XCH A,R7
- 006A 241E ADD A,#01EH
- 006C FD MOV R5,A
- 006D E4 CLR A
- 006E 3F ADDC A,R7
- 006F FC MOV R4,A
- 0070 EB MOV A,R3
- 0071 2406 ADD A,#06H
- 0073 FF MOV R7,A
- 0074 EA MOV A,R2
- 0075 33 RLC A
- 0076 FE MOV R6,A
- 0077 D3 SETB C
- 0078 ED MOV A,R5
- 0079 9F SUBB A,R7
- 007A EC MOV A,R4
- 007B 9E SUBB A,R6
- 007C 22 RET
- 007D L?0381:
- 007D L?0382:
- 007D C3 CLR C
- 007E EF MOV A,R7
- 007F 9B SUBB A,R3
- 0080 FF MOV R7,A
- 0081 EE MOV A,R6
- 0082 9A SUBB A,R2
- 0083 FE MOV R6,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 49
- 0084 ED MOV A,R5
- 0085 99 SUBB A,R1
- 0086 FD MOV R5,A
- 0087 EC MOV A,R4
- 0088 98 SUBB A,R0
- 0089 FC MOV R4,A
- 008A 22 RET
- 008B L?0383:
- 008B L?0384:
- 008B E4 CLR A
- 008C 7B02 MOV R3,#02H
- 008E FA MOV R2,A
- 008F F9 MOV R1,A
- 0090 F8 MOV R0,A
- 0091 020000 E LJMP ?C?ULDIV
- 0094 L?0386:
- 0094 L?0387:
- 0094 750006 E MOV Data,#06H
- 0097 L?0388:
- 0097 E4 CLR A
- 0098 F500 E MOV Data+01H,A
- 009A 750075 E MOV Data+02H,#075H
- 009D 22 RET
- 009E L?0389:
- 009E FE MOV R6,A
- 009F 7800 E MOV R0,#LOW ucH_Min_Margin
- 00A1 E6 MOV A,@R0
- 00A2 F9 MOV R1,A
- 00A3 7A00 MOV R2,#00H
- 00A5 2F ADD A,R7
- 00A6 FF MOV R7,A
- 00A7 EA MOV A,R2
- 00A8 3E ADDC A,R6
- 00A9 FE MOV R6,A
- 00AA AB00 E MOV R3,stMUD
- 00AC C3 CLR C
- 00AD EF MOV A,R7
- 00AE 9B SUBB A,R3
- 00AF 22 RET
- 00B0 L?0390:
- 00B0 7800 R MOV R0,#LOW usH_Start
- 00B2 E6 MOV A,@R0
- 00B3 F500 R MOV Curr_StartH,A
- 00B5 08 INC R0
- 00B6 E6 MOV A,@R0
- 00B7 F500 R MOV Curr_StartH+01H,A
- 00B9 08 INC R0
- 00BA E6 MOV A,@R0
- 00BB F500 R MOV Curr_EndH,A
- 00BD 08 INC R0
- 00BE E6 MOV A,@R0
- 00BF F500 R MOV Curr_EndH+01H,A
- 00C1 22 RET
- 00C2 L?0391:
- 00C2 C3 CLR C
- 00C3 EF MOV A,R7
- 00C4 9B SUBB A,R3
- 00C5 F500 E MOV Data+03H,A
- 00C7 EE MOV A,R6
- 00C8 9A SUBB A,R2
- 00C9 F500 E MOV Data+02H,A
- 00CB ED MOV A,R5
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 50
- 00CC 99 SUBB A,R1
- 00CD F500 E MOV Data+01H,A
- 00CF EC MOV A,R4
- 00D0 98 SUBB A,R0
- 00D1 F500 E MOV Data,A
- 00D3 22 RET
- 00D4 L?0392:
- 00D4 7800 R MOV R0,#LOW ulTemp0
- 00D6 L?0393:
- 00D6 120000 E LCALL ?C?LLDIDATA0
- 00D9 D3 SETB C
- 00DA 020000 E LJMP ?C?ULCMP
- 00DD L?0394:
- 00DD ED MOV A,R5
- 00DE 9F SUBB A,R7
- 00DF FF MOV R7,A
- 00E0 EC MOV A,R4
- 00E1 9E SUBB A,R6
- 00E2 CF XCH A,R7
- 00E3 2401 ADD A,#01H
- 00E5 F6 MOV @R0,A
- 00E6 E4 CLR A
- 00E7 3F ADDC A,R7
- 00E8 18 DEC R0
- 00E9 F6 MOV @R0,A
- 00EA E4 CLR A
- 00EB F500 R MOV NM,A
- 00ED 22 RET
- 00EE L?0395:
- 00EE AB07 MOV R3,AR7
- 00F0 FA MOV R2,A
- 00F1 E4 CLR A
- 00F2 F9 MOV R1,A
- 00F3 F8 MOV R0,A
- 00F4 AE00 E MOV R6,Data+02H
- 00F6 AF00 E MOV R7,Data+03H
- 00F8 FC MOV R4,A
- 00F9 FD MOV R5,A
- 00FA 020000 E LJMP ?C?LMUL
- 00FD L?0396:
- 00FD 850000 R MOV ulCompare+03H,ulSum+03H
- 0100 850000 R MOV ulCompare+02H,ulSum+02H
- 0103 850000 R MOV ulCompare+01H,ulSum+01H
- 0106 850000 R MOV ulCompare,ulSum
- 0109 850000 R MOV Result,stMUD+02H
- 010C 22 RET
- 010D L?0397:
- 010D L?0398:
- 010D 7800 E MOV R0,#LOW ucV_Max_Margin
- 010F E6 MOV A,@R0
- 0110 FF MOV R7,A
- 0111 C3 CLR C
- 0112 9500 E SUBB A,stMUD+01H
- 0114 22 RET
- 0115 L?0399:
- 0115 120000 E LCALL ?C?LLDIDATA0
- 0118 EB MOV A,R3
- 0119 2F ADD A,R7
- 011A FF MOV R7,A
- 011B EA MOV A,R2
- 011C 3E ADDC A,R6
- 011D FE MOV R6,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 51
- 011E E9 MOV A,R1
- 011F 3D ADDC A,R5
- 0120 FD MOV R5,A
- 0121 E8 MOV A,R0
- 0122 3C ADDC A,R4
- 0123 FC MOV R4,A
- 0124 22 RET
- 0125 L?0401:
- 0125 E4 CLR A
- 0126 FF MOV R7,A
- 0127 E500 E MOV A,Data+0EH
- 0129 FE MOV R6,A
- 012A E500 E MOV A,Data+0DH
- 012C FD MOV R5,A
- 012D E500 E MOV A,Data+0CH
- 012F FC MOV R4,A
- 0130 020000 E LJMP ?C?LSTIDATA
- 0133 L?0403:
- 0133 ED MOV A,R5
- 0134 24FA ADD A,#0FAH
- 0136 FF MOV R7,A
- 0137 EC MOV A,R4
- 0138 34FF ADDC A,#0FFH
- 013A CF XCH A,R7
- 013B C3 CLR C
- 013C 9B SUBB A,R3
- 013D CF XCH A,R7
- 013E 9A SUBB A,R2
- 013F FE MOV R6,A
- 0140 22 RET
- 0141 L?0404:
- 0141 L?0405:
- 0141 AB00 R MOV R3,ulCompare+03H
- 0143 AA00 R MOV R2,ulCompare+02H
- 0145 A900 R MOV R1,ulCompare+01H
- 0147 A800 R MOV R0,ulCompare
- 0149 22 RET
- 014A L?0406:
- 014A L?0407:
- 014A 18 DEC R0
- 014B E4 CLR A
- 014C 36 ADDC A,@R0
- 014D 540F ANL A,#0FH
- 014F FD MOV R5,A
- 0150 18 DEC R0
- 0151 E6 MOV A,@R0
- 0152 22 RET
- 0153 L?0408:
- 0153 L?0409:
- 0153 AF00 E MOV R7,Data+0FH
- 0155 AE00 E MOV R6,Data+0EH
- 0157 AD00 E MOV R5,Data+0DH
- 0159 AC00 E MOV R4,Data+0CH
- 015B 22 RET
- 015C L?0410:
- 015C C3 CLR C
- 015D EF MOV A,R7
- 015E 9B SUBB A,R3
- 015F FF MOV R7,A
- 0160 EE MOV A,R6
- 0161 9A SUBB A,R2
- 0162 FE MOV R6,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 52
- 0163 ED MOV A,R5
- 0164 99 SUBB A,R1
- 0165 FD MOV R5,A
- 0166 EC MOV A,R4
- 0167 98 SUBB A,R0
- 0168 FC MOV R4,A
- 0169 22 RET
- 016A L?0411:
- 016A 7800 E MOV R0,#LOW usStdHS
- 016C E6 MOV A,@R0
- 016D FE MOV R6,A
- 016E 08 INC R0
- 016F E6 MOV A,@R0
- 0170 FB MOV R3,A
- 0171 AA06 MOV R2,AR6
- 0173 E4 CLR A
- 0174 F9 MOV R1,A
- 0175 F8 MOV R0,A
- 0176 22 RET
- 0177 L?0412:
- 0177 4B ORL A,R3
- 0178 F500 E MOV Data+05H,A
- 017A 750008 E MOV Data+06H,#08H
- 017D E4 CLR A
- 017E F500 E MOV Data+07H,A
- 0180 75007B E MOV Data+08H,#07BH
- 0183 22 RET
- 0184 L?0413:
- 0184 AB00 R MOV R3,ulTemp0+03H
- 0186 AA00 R MOV R2,ulTemp0+02H
- 0188 A900 R MOV R1,ulTemp0+01H
- 018A A800 R MOV R0,ulTemp0
- 018C C3 CLR C
- 018D 020000 E LJMP ?C?ULCMP
- 0190 L?0414:
- 0190 FC MOV R4,A
- 0191 C3 CLR C
- 0192 E500 R MOV A,Curr_EndH+01H
- 0194 9500 R SUBB A,Curr_StartH+01H
- 0196 FB MOV R3,A
- 0197 E500 R MOV A,Curr_EndH
- 0199 9500 R SUBB A,Curr_StartH
- 019B FA MOV R2,A
- 019C 22 RET
- 019D L?0417:
- 019D L?0418:
- 019D 7800 R MOV R0,#LOW ulTemp2
- 019F 120000 E LCALL ?C?LLDIDATA
- 01A2 7800 R MOV R0,#LOW ulTemp1
- 01A4 22 RET
- 01A5 L?0419:
- 01A5 L?0420:
- 01A5 7800 R MOV R0,#LOW ulTemp0
- 01A7 120000 E LCALL ?C?LLDIDATA
- 01AA 7800 R MOV R0,#LOW ulTemp2
- 01AC 22 RET
- 01AD L?0421:
- 01AD AF00 E MOV R7,Data+03H
- 01AF AE00 E MOV R6,Data+02H
- 01B1 AD00 E MOV R5,Data+01H
- 01B3 7800 R MOV R0,#LOW ulTemp1
- 01B5 020000 E LJMP ?C?LSTIDATA
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 53
- 01B8 L?0423:
- 01B8 540F ANL A,#0FH
- 01BA FB MOV R3,A
- 01BB EC MOV A,R4
- 01BC C4 SWAP A
- 01BD F8 MOV R0,A
- 01BE 54F0 ANL A,#0F0H
- 01C0 C8 XCH A,R0
- 01C1 ED MOV A,R5
- 01C2 22 RET
- 01C3 L?0424:
- 01C3 E4 CLR A
- 01C4 FB MOV R3,A
- 01C5 7A80 MOV R2,#080H
- 01C7 F9 MOV R1,A
- 01C8 F8 MOV R0,A
- 01C9 C3 CLR C
- 01CA 020000 E LJMP ?C?ULCMP
- 01CD L?0425:
- 01CD 18 DEC R0
- 01CE 96 SUBB A,@R0
- 01CF FE MOV R6,A
- 01D0 D3 SETB C
- 01D1 EF MOV A,R7
- 01D2 94FF SUBB A,#0FFH
- 01D4 EE MOV A,R6
- 01D5 9400 SUBB A,#00H
- 01D7 22 RET
- 01D8 L?0426:
- 01D8 7800 R MOV R0,#LOW usH_End+01H
- 01DA E6 MOV A,@R0
- 01DB FF MOV R7,A
- 01DC 7800 E MOV R0,#LOW usIPH_ACT_WID+01H
- 01DE E6 MOV A,@R0
- 01DF C3 CLR C
- 01E0 9F SUBB A,R7
- 01E1 FF MOV R7,A
- 01E2 22 RET
- 01E3 L?0427:
- 01E3 FF MOV R7,A
- 01E4 E6 MOV A,@R0
- 01E5 FC MOV R4,A
- 01E6 08 INC R0
- 01E7 E6 MOV A,@R0
- 01E8 FD MOV R5,A
- 01E9 D3 SETB C
- 01EA 9F SUBB A,R7
- 01EB EC MOV A,R4
- 01EC 9E SUBB A,R6
- 01ED 22 RET
- 01EE L?0429:
- 01EE F500 E MOV Data+0CH,A
- 01F0 750001 E MOV Data+0DH,#01H
- 01F3 F500 E MOV Data+0EH,A
- 01F5 7F00 E MOV R7,#LOW Data
- 01F7 22 RET
- 01F8 L?0430:
- 01F8 E4 CLR A
- 01F9 F500 R MOV ulCompare+03H,A
- 01FB F500 R MOV ulCompare+02H,A
- 01FD F500 R MOV ulCompare+01H,A
- 01FF F500 R MOV ulCompare,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 54
- 0201 22 RET
- 0202 L?0431:
- 0202 7800 E MOV R0,#LOW usIPH_ACT_WID+01H
- 0204 E6 MOV A,@R0
- 0205 FF MOV R7,A
- 0206 7800 R MOV R0,#LOW usH_End+01H
- 0208 E6 MOV A,@R0
- 0209 C3 CLR C
- 020A 9F SUBB A,R7
- 020B 22 RET
- 020C L?0432:
- 020C C3 CLR C
- 020D 7440 MOV A,#040H
- 020F 9F SUBB A,R7
- 0210 FF MOV R7,A
- 0211 E4 CLR A
- 0212 9400 SUBB A,#00H
- 0214 FE MOV R6,A
- 0215 22 RET
- ; FUNCTION Com016F (END)
- ; FUNCTION Wait_Finish (BEGIN)
- ; SOURCE LINE # 14
- ; SOURCE LINE # 15
- ; SOURCE LINE # 18
- 0000 E4 CLR A
- 0001 FD MOV R5,A
- 0002 7F01 MOV R7,#01H
- 0004 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 19
- 0007 E4 CLR A
- 0008 FD MOV R5,A
- 0009 7F1F MOV R7,#01FH
- 000B 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 22
- 000E 75003C R MOV Wait_Time_Cnt,#03CH
- ; SOURCE LINE # 23
- 0011 750019 R MOV IVS_Event,#019H
- 0014 ?C0003:
- ; SOURCE LINE # 25
- ; SOURCE LINE # 26
- 0014 7F01 MOV R7,#01H
- 0016 120000 E LCALL _Delay_Xms
- ; SOURCE LINE # 83
- 0019 7F7F MOV R7,#07FH
- ; SOURCE LINE # 84
- ; SOURCE LINE # 85
- 001B 120000 R LCALL L?0433
- 001E 30E003 JNB ACC.0,?C0002
- 0021 D500F0 R DJNZ Wait_Time_Cnt,?C0003
- 0024 ?C0002:
- ; SOURCE LINE # 87
- 0024 7F01 MOV R7,#01H
- ; SOURCE LINE # 90
- 0026 120000 R LCALL L?0433
- 0029 6007 JZ ?C0005
- ; SOURCE LINE # 91
- 002B E4 CLR A
- 002C FD MOV R5,A
- 002D 7F01 MOV R7,#01H
- 002F 120000 E LCALL _RTDSetByte
- 0032 ?C0005:
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 55
- ; SOURCE LINE # 99
- 0032 E500 E MOV A,Data
- 0034 5463 ANL A,#063H
- 0036 6004 JZ ?C0006
- 0038 7FFC MOV R7,#0FCH
- 003A 800A SJMP ?C0007
- 003C ?C0006:
- 003C E500 R MOV A,Wait_Time_Cnt
- 003E 7004 JNZ ?C0008
- 0040 7FFD MOV R7,#0FDH
- 0042 8002 SJMP ?C0009
- 0044 ?C0008:
- 0044 7F00 MOV R7,#00H
- 0046 ?C0009:
- 0046 ?C0007:
- 0046 8F00 E MOV Data,R7
- ; SOURCE LINE # 100
- 0048 22 RET
- 0049 L?0433:
- 0049 7B01 MOV R3,#01H
- 004B 7D01 MOV R5,#01H
- 004D 120000 E LCALL _RTDRead
- 0050 E500 E MOV A,Data
- 0052 22 RET
- ; FUNCTION Wait_Finish (END)
- ; FUNCTION Wait_For_IVS (BEGIN)
- ; SOURCE LINE # 103
- ; SOURCE LINE # 104
- ; SOURCE LINE # 107
- 0000 750032 R MOV t,#032H
- ; SOURCE LINE # 109
- 0003 E4 CLR A
- 0004 FD MOV R5,A
- 0005 7F1F MOV R7,#01FH
- 0007 120000 E LCALL _RTDSetByte
- 000A ?C0013:
- ; SOURCE LINE # 111
- ; SOURCE LINE # 112
- 000A E4 CLR A
- 000B FB MOV R3,A
- 000C 7D01 MOV R5,#01H
- 000E 7F1F MOV R7,#01FH
- 0010 120000 E LCALL _RTDRead
- ; SOURCE LINE # 113
- 0013 530001 E ANL Data,#01H
- ; SOURCE LINE # 115
- 0016 7F01 MOV R7,#01H
- 0018 120000 E LCALL _Delay_Xms
- ; SOURCE LINE # 116
- 001B E500 E MOV A,Data
- 001D 7007 JNZ ?C0015
- 001F AF00 R MOV R7,t
- 0021 1500 R DEC t
- 0023 EF MOV A,R7
- 0024 70E4 JNZ ?C0013
- ; SOURCE LINE # 117
- 0026 ?C0015:
- 0026 22 RET
- ; FUNCTION Wait_For_IVS (END)
- ; FUNCTION _Measure_PositionV (BEGIN)
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 56
- ; SOURCE LINE # 127
- 0000 8F00 R MOV NM_V,R7
- ; SOURCE LINE # 128
- ; SOURCE LINE # 131
- 0002 E4 CLR A
- 0003 FB MOV R3,A
- 0004 7D02 MOV R5,#02H
- 0006 7F51 MOV R7,#051H
- 0008 120000 E LCALL _RTDRead
- ; SOURCE LINE # 132
- ; SOURCE LINE # 133
- ; SOURCE LINE # 135
- 000B 120000 R LCALL L?0374
- 000E F500 R MOV usRBound+01H,A
- 0010 EF MOV A,R7
- 0011 34FF ADDC A,#0FFH
- 0013 F500 R MOV usRBound,A
- ; SOURCE LINE # 136
- 0015 AF00 R MOV R7,usRBound+01H
- 0017 120000 R LCALL L?0395
- 001A C006 PUSH AR6
- 001C C007 PUSH AR7
- 001E 120000 R LCALL L?0411
- 0021 D007 POP AR7
- 0023 D006 POP AR6
- 0025 120000 E LCALL ?C?ULDIV
- ;---- Variable 'usLBound' assigned to Register 'R4/R5' ----
- 0028 AD07 MOV R5,AR7
- 002A AC06 MOV R4,AR6
- ; SOURCE LINE # 142
- 002C E500 R MOV A,usRBound+01H
- 002E 2402 ADD A,#02H
- 0030 FF MOV R7,A
- 0031 E4 CLR A
- 0032 3500 R ADDC A,usRBound
- 0034 120000 R LCALL L?0389
- 0037 F500 R MOV usRBound+01H,A
- 0039 EE MOV A,R6
- 003A 9A SUBB A,R2
- 003B F500 R MOV usRBound,A
- ; SOURCE LINE # 143
- ; SOURCE LINE # 144
- 003D 120000 R LCALL L?0380
- 0040 4005 JC ?C0016
- 0042 120000 R LCALL L?0403
- 0045 8004 SJMP ?C0017
- 0047 ?C0016:
- 0047 7E00 MOV R6,#00H
- 0049 7F01 MOV R7,#01H
- 004B ?C0017:
- 004B AC06 MOV R4,AR6
- 004D AD07 MOV R5,AR7
- ; SOURCE LINE # 146
- 004F 5300FC R ANL NM_V,#0FCH
- ; SOURCE LINE # 148
- ; SOURCE LINE # 149
- ; SOURCE LINE # 150
- 0052 120000 R LCALL L?0386
- ; SOURCE LINE # 151
- 0055 8D00 E MOV Data+03H,R5
- ; SOURCE LINE # 152
- 0057 850000 E MOV Data+04H,usRBound+01H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 57
- ; SOURCE LINE # 153
- 005A E500 R MOV A,usRBound
- 005C 120000 R LCALL L?0423
- 005F 120000 R LCALL L?0373
- ; SOURCE LINE # 154
- ; SOURCE LINE # 155
- ; SOURCE LINE # 156
- 0062 120000 R LCALL L?0412
- ; SOURCE LINE # 157
- 0065 850000 E MOV Data+09H,NM_V
- ; SOURCE LINE # 158
- 0068 850000 E MOV Data+0AH,NM_V
- ; SOURCE LINE # 159
- 006B 850000 E MOV Data+0BH,NM_V
- ; SOURCE LINE # 160
- ; SOURCE LINE # 161
- ; SOURCE LINE # 162
- ; SOURCE LINE # 163
- 006E 120000 R LCALL L?0429
- 0071 120000 E LCALL _RTDWrite
- ; SOURCE LINE # 165
- 0074 120000 R LCALL Wait_Finish
- ; SOURCE LINE # 168
- 0077 E500 E MOV A,Data
- 0079 6002 JZ ?C0018
- 007B FF MOV R7,A
- 007C 22 RET
- 007D ?C0018:
- ; SOURCE LINE # 170
- 007D E4 CLR A
- 007E FB MOV R3,A
- 007F 7D04 MOV R5,#04H
- 0081 7F80 MOV R7,#080H
- 0083 120000 E LCALL _RTDRead
- ; SOURCE LINE # 173
- 0086 E500 E MOV A,Data+01H
- 0088 540F ANL A,#0FH
- 008A F500 E MOV Data+06H,A
- ; SOURCE LINE # 174
- 008C 850000 E MOV Data+07H,Data
- ; SOURCE LINE # 175
- 008F E500 E MOV A,Data+03H
- 0091 540F ANL A,#0FH
- 0093 F500 E MOV Data+08H,A
- ; SOURCE LINE # 176
- 0095 850000 E MOV Data+09H,Data+02H
- ; SOURCE LINE # 179
- 0098 E500 E MOV A,Data+07H
- 009A 4500 E ORL A,Data+06H
- 009C 600C JZ ?C0020
- 009E E500 E MOV A,Data+07H
- 00A0 24FF ADD A,#0FFH
- 00A2 FF MOV R7,A
- 00A3 E500 E MOV A,Data+06H
- 00A5 34FF ADDC A,#0FFH
- 00A7 FE MOV R6,A
- 00A8 8004 SJMP ?C0021
- 00AA ?C0020:
- 00AA 7E00 MOV R6,#00H
- 00AC 7F00 MOV R7,#00H
- 00AE ?C0021:
- 00AE 7800 R MOV R0,#LOW usVer_Start
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 58
- 00B0 A606 MOV @R0,AR6
- 00B2 08 INC R0
- 00B3 A607 MOV @R0,AR7
- ; SOURCE LINE # 180
- 00B5 E500 E MOV A,Data+09H
- 00B7 4500 E ORL A,Data+08H
- 00B9 600C JZ ?C0022
- 00BB E500 E MOV A,Data+09H
- 00BD 24FF ADD A,#0FFH
- 00BF FF MOV R7,A
- 00C0 E500 E MOV A,Data+08H
- 00C2 34FF ADDC A,#0FFH
- 00C4 FE MOV R6,A
- 00C5 8004 SJMP ?C0023
- 00C7 ?C0022:
- 00C7 7E00 MOV R6,#00H
- 00C9 7F00 MOV R7,#00H
- 00CB ?C0023:
- 00CB 7800 R MOV R0,#LOW usVer_End
- 00CD EE MOV A,R6
- 00CE F6 MOV @R0,A
- 00CF 08 INC R0
- 00D0 EF MOV A,R7
- 00D1 F6 MOV @R0,A
- ; SOURCE LINE # 183
- 00D2 4E ORL A,R6
- 00D3 7003 JNZ ?C0024
- 00D5 7FF8 MOV R7,#0F8H
- 00D7 22 RET
- 00D8 ?C0024:
- ; SOURCE LINE # 195
- 00D8 7800 R MOV R0,#LOW usVer_Start
- 00DA E6 MOV A,@R0
- 00DB FE MOV R6,A
- 00DC 08 INC R0
- 00DD E6 MOV A,@R0
- 00DE FF MOV R7,A
- 00DF D3 SETB C
- 00E0 7406 MOV A,#06H
- 00E2 9F SUBB A,R7
- 00E3 E4 CLR A
- 00E4 9E SUBB A,R6
- 00E5 4008 JC ?C0025
- ; SOURCE LINE # 196
- ; SOURCE LINE # 197
- 00E7 750000 E MOV Data+06H,#00H
- 00EA 750006 E MOV Data+07H,#06H
- ; SOURCE LINE # 198
- 00ED 8022 SJMP ?C0026
- 00EF ?C0025:
- ; SOURCE LINE # 200
- ; SOURCE LINE # 202
- 00EF EF MOV A,R7
- 00F0 7800 E MOV R0,#LOW usIPV_ACT_LEN+01H
- 00F2 26 ADD A,@R0
- 00F3 FF MOV R7,A
- 00F4 EE MOV A,R6
- 00F5 18 DEC R0
- 00F6 36 ADDC A,@R0
- 00F7 CF XCH A,R7
- 00F8 24FF ADD A,#0FFH
- 00FA CF XCH A,R7
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 59
- 00FB 34FF ADDC A,#0FFH
- 00FD FE MOV R6,A
- 00FE D3 SETB C
- 00FF 7800 R MOV R0,#LOW usVer_End+01H
- 0101 E6 MOV A,@R0
- 0102 9F SUBB A,R7
- 0103 18 DEC R0
- 0104 E6 MOV A,@R0
- 0105 9E SUBB A,R6
- 0106 4009 JC ?C0026
- ; SOURCE LINE # 203
- ; SOURCE LINE # 204
- 0108 EE MOV A,R6
- 0109 F6 MOV @R0,A
- 010A 08 INC R0
- 010B EF MOV A,R7
- 010C F6 MOV @R0,A
- ; SOURCE LINE # 206
- 010D 8E00 E MOV Data+08H,R6
- 010F F500 E MOV Data+09H,A
- ; SOURCE LINE # 207
- ; SOURCE LINE # 208
- 0111 ?C0026:
- ; SOURCE LINE # 211
- 0111 750006 E MOV Data,#06H
- ; SOURCE LINE # 212
- 0114 E4 CLR A
- 0115 F500 E MOV Data+01H,A
- ; SOURCE LINE # 213
- 0117 750078 E MOV Data+02H,#078H
- ; SOURCE LINE # 214
- 011A 850000 E MOV Data+03H,Data+07H
- ; SOURCE LINE # 215
- 011D 850000 E MOV Data+04H,Data+09H
- ; SOURCE LINE # 216
- 0120 E500 E MOV A,Data+06H
- 0122 C4 SWAP A
- 0123 54F0 ANL A,#0F0H
- 0125 2500 E ADD A,Data+08H
- 0127 F500 E MOV Data+05H,A
- ; SOURCE LINE # 217
- 0129 E4 CLR A
- 012A F500 E MOV Data+06H,A
- ; SOURCE LINE # 218
- 012C 7F00 E MOV R7,#LOW Data
- 012E 120000 E LCALL _RTDWrite
- ; SOURCE LINE # 220
- 0131 7F00 MOV R7,#00H
- ; SOURCE LINE # 221
- 0133 ?C0019:
- 0133 22 RET
- ; FUNCTION _Measure_PositionV (END)
- ; FUNCTION _Measure_PositionH (BEGIN)
- ; SOURCE LINE # 230
- 0000 8F00 R MOV NM_H,R7
- ; SOURCE LINE # 231
- ; SOURCE LINE # 234
- 0002 E4 CLR A
- 0003 FB MOV R3,A
- 0004 7D02 MOV R5,#02H
- 0006 7F51 MOV R7,#051H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 60
- 0008 120000 E LCALL _RTDRead
- ; SOURCE LINE # 235
- ; SOURCE LINE # 236
- ; SOURCE LINE # 238
- 000B 120000 R LCALL L?0374
- 000E F500 R MOV usRBound+01H,A
- 0010 EF MOV A,R7
- 0011 34FF ADDC A,#0FFH
- 0013 F500 R MOV usRBound,A
- ; SOURCE LINE # 239
- 0015 AF00 R MOV R7,usRBound+01H
- 0017 120000 R LCALL L?0395
- 001A C006 PUSH AR6
- 001C C007 PUSH AR7
- 001E 120000 R LCALL L?0411
- 0021 D007 POP AR7
- 0023 D006 POP AR6
- 0025 120000 E LCALL ?C?ULDIV
- ;---- Variable 'usLBound' assigned to Register 'R4/R5' ----
- 0028 AD07 MOV R5,AR7
- 002A AC06 MOV R4,AR6
- ; SOURCE LINE # 241
- 002C E500 R MOV A,usRBound+01H
- 002E 2402 ADD A,#02H
- 0030 FF MOV R7,A
- 0031 E4 CLR A
- 0032 3500 R ADDC A,usRBound
- 0034 120000 R LCALL L?0389
- 0037 F500 R MOV usRBound+01H,A
- 0039 EE MOV A,R6
- 003A 9A SUBB A,R2
- 003B F500 R MOV usRBound,A
- ; SOURCE LINE # 243
- ; SOURCE LINE # 244
- 003D 120000 R LCALL L?0380
- 0040 4005 JC ?C0028
- 0042 120000 R LCALL L?0403
- 0045 8004 SJMP ?C0029
- 0047 ?C0028:
- 0047 7E00 MOV R6,#00H
- 0049 7F01 MOV R7,#01H
- 004B ?C0029:
- 004B AC06 MOV R4,AR6
- 004D AD07 MOV R5,AR7
- ; SOURCE LINE # 246
- 004F 5300FC R ANL NM_H,#0FCH
- ; SOURCE LINE # 248
- ; SOURCE LINE # 249
- ; SOURCE LINE # 250
- 0052 120000 R LCALL L?0386
- ; SOURCE LINE # 251
- 0055 8D00 E MOV Data+03H,R5
- ; SOURCE LINE # 252
- 0057 850000 E MOV Data+04H,usRBound+01H
- ; SOURCE LINE # 253
- 005A E500 R MOV A,usRBound
- 005C 120000 R LCALL L?0423
- 005F 120000 R LCALL L?0373
- ; SOURCE LINE # 254
- ; SOURCE LINE # 255
- ; SOURCE LINE # 256
- 0062 120000 R LCALL L?0412
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 61
- ; SOURCE LINE # 257
- 0065 850000 E MOV Data+09H,NM_H
- ; SOURCE LINE # 258
- 0068 850000 E MOV Data+0AH,NM_H
- ; SOURCE LINE # 259
- 006B 850000 E MOV Data+0BH,NM_H
- ; SOURCE LINE # 260
- ; SOURCE LINE # 261
- ; SOURCE LINE # 262
- ; SOURCE LINE # 263
- 006E 120000 R LCALL L?0429
- 0071 120000 E LCALL _RTDWrite
- ; SOURCE LINE # 265
- 0074 120000 R LCALL Wait_Finish
- ; SOURCE LINE # 267
- 0077 E500 E MOV A,Data
- 0079 6002 JZ ?C0030
- 007B FF MOV R7,A
- 007C 22 RET
- 007D ?C0030:
- ; SOURCE LINE # 269
- 007D E4 CLR A
- 007E FB MOV R3,A
- 007F 7D04 MOV R5,#04H
- 0081 7F84 MOV R7,#084H
- 0083 120000 E LCALL _RTDRead
- ; SOURCE LINE # 272
- 0086 E500 E MOV A,Data+03H
- 0088 540F ANL A,#0FH
- 008A F500 E MOV Data+04H,A
- ; SOURCE LINE # 273
- 008C 850000 E MOV Data+05H,Data+02H
- ; SOURCE LINE # 274
- 008F E500 E MOV A,Data+01H
- 0091 540F ANL A,#0FH
- 0093 F500 E MOV Data+02H,A
- ; SOURCE LINE # 275
- 0095 850000 E MOV Data+03H,Data
- ; SOURCE LINE # 277
- 0098 D3 SETB C
- 0099 74FF MOV A,#0FFH
- 009B 9500 E SUBB A,Data+03H
- 009D 7407 MOV A,#07H
- 009F 9500 E SUBB A,Data+02H
- 00A1 5003 JNC ?C0032
- 00A3 7FF8 MOV R7,#0F8H
- 00A5 22 RET
- 00A6 ?C0032:
- ; SOURCE LINE # 280
- 00A6 7B01 MOV R3,#01H
- 00A8 7D01 MOV R5,#01H
- 00AA 7F04 MOV R7,#04H
- 00AC 120000 E LCALL _RTDRead
- ; SOURCE LINE # 283
- 00AF E500 E MOV A,Data
- 00B1 540C ANL A,#0CH
- 00B3 FF MOV R7,A
- 00B4 BF0816 CJNE R7,#08H,?C0033
- ; SOURCE LINE # 284
- ; SOURCE LINE # 285
- 00B7 7403 MOV A,#03H
- 00B9 2500 E ADD A,Data+03H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 62
- 00BB F500 E MOV Data+03H,A
- 00BD E4 CLR A
- 00BE 3500 E ADDC A,Data+02H
- 00C0 F500 E MOV Data+02H,A
- ; SOURCE LINE # 286
- 00C2 7403 MOV A,#03H
- 00C4 2500 E ADD A,Data+05H
- 00C6 F500 E MOV Data+05H,A
- 00C8 E4 CLR A
- 00C9 3500 E ADDC A,Data+04H
- 00CB F500 E MOV Data+04H,A
- ; SOURCE LINE # 287
- 00CD ?C0033:
- ; SOURCE LINE # 298
- 00CD 7E00 MOV R6,#00H
- 00CF E500 E MOV A,Data+03H
- 00D1 2500 E ADD A,stMUD
- 00D3 FF MOV R7,A
- 00D4 EE MOV A,R6
- 00D5 3500 E ADDC A,Data+02H
- 00D7 FE MOV R6,A
- 00D8 C3 CLR C
- 00D9 EF MOV A,R7
- 00DA 9487 SUBB A,#087H
- 00DC EE MOV A,R6
- 00DD 9400 SUBB A,#00H
- 00DF 400A JC ?C0034
- 00E1 EF MOV A,R7
- 00E2 2479 ADD A,#079H
- 00E4 FF MOV R7,A
- 00E5 EE MOV A,R6
- 00E6 34FF ADDC A,#0FFH
- 00E8 FE MOV R6,A
- 00E9 8004 SJMP ?C0035
- 00EB ?C0034:
- 00EB 7E00 MOV R6,#00H
- 00ED 7F00 MOV R7,#00H
- 00EF ?C0035:
- 00EF 7800 R MOV R0,#LOW usH_Start
- 00F1 A606 MOV @R0,AR6
- 00F3 08 INC R0
- 00F4 A607 MOV @R0,AR7
- ; SOURCE LINE # 300
- 00F6 7E00 MOV R6,#00H
- 00F8 E500 E MOV A,Data+05H
- 00FA 2500 E ADD A,stMUD
- 00FC FF MOV R7,A
- 00FD EE MOV A,R6
- 00FE 3500 E ADDC A,Data+04H
- 0100 FE MOV R6,A
- 0101 C3 CLR C
- 0102 EF MOV A,R7
- 0103 9488 SUBB A,#088H
- 0105 EE MOV A,R6
- 0106 9400 SUBB A,#00H
- 0108 400A JC ?C0036
- 010A EF MOV A,R7
- 010B 2478 ADD A,#078H
- 010D FF MOV R7,A
- 010E EE MOV A,R6
- 010F 34FF ADDC A,#0FFH
- 0111 FE MOV R6,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 63
- 0112 8004 SJMP ?C0037
- 0114 ?C0036:
- 0114 7E0F MOV R6,#0FH
- 0116 7FFF MOV R7,#0FFH
- 0118 ?C0037:
- 0118 7800 R MOV R0,#LOW usH_End
- 011A A606 MOV @R0,AR6
- 011C 08 INC R0
- 011D A607 MOV @R0,AR7
- ; SOURCE LINE # 302
- 011F 7F00 MOV R7,#00H
- ; SOURCE LINE # 303
- 0121 ?C0031:
- 0121 22 RET
- ; FUNCTION _Measure_PositionH (END)
- ; FUNCTION _Measure_PositionN (BEGIN)
- ; SOURCE LINE # 312
- 0000 8F00 R MOV NM,R7
- ; SOURCE LINE # 313
- ; SOURCE LINE # 316
- 0002 120000 R LCALL _Measure_PositionV
- ;---- Variable 'Result' assigned to Register 'R7' ----
- ; SOURCE LINE # 318
- 0005 EF MOV A,R7
- 0006 7005 JNZ ?C0038
- ; SOURCE LINE # 319
- ; SOURCE LINE # 320
- 0008 AF00 R MOV R7,NM
- 000A 120000 R LCALL _Measure_PositionH
- ; SOURCE LINE # 321
- 000D ?C0038:
- ; SOURCE LINE # 323
- ; SOURCE LINE # 324
- 000D ?C0039:
- 000D 22 RET
- ; FUNCTION _Measure_PositionN (END)
- ; FUNCTION _Read_Auto_Info (BEGIN)
- ; SOURCE LINE # 419
- 0000 8F00 R MOV index,R7
- ; SOURCE LINE # 420
- ; SOURCE LINE # 421
- 0002 E500 R MOV A,index
- 0004 6027 JZ ?C0041
- 0006 ?C0040:
- ; SOURCE LINE # 423
- 0006 E4 CLR A
- 0007 FB MOV R3,A
- 0008 7D04 MOV R5,#04H
- 000A 7F88 MOV R7,#088H
- 000C 120000 E LCALL _RTDRead
- ; SOURCE LINE # 425
- 000F E500 R MOV A,index
- 0011 25E0 ADD A,ACC
- 0013 25E0 ADD A,ACC
- 0015 FF MOV R7,A
- 0016 2400 E ADD A,#LOW Data
- 0018 F8 MOV R0,A
- 0019 A600 E MOV @R0,Data+03H
- ; SOURCE LINE # 426
- 001B 7400 E MOV A,#LOW Data+01H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 64
- 001D 2F ADD A,R7
- 001E F8 MOV R0,A
- 001F A600 E MOV @R0,Data+02H
- ; SOURCE LINE # 427
- 0021 7400 E MOV A,#LOW Data+02H
- 0023 2F ADD A,R7
- 0024 F8 MOV R0,A
- 0025 A600 E MOV @R0,Data+01H
- ; SOURCE LINE # 428
- 0027 7400 E MOV A,#LOW Data+03H
- 0029 2F ADD A,R7
- 002A F8 MOV R0,A
- 002B A600 E MOV @R0,Data
- ; SOURCE LINE # 430
- 002D ?C0041:
- 002D 22 RET
- ; FUNCTION _Read_Auto_Info (END)
- ; FUNCTION FindColor (BEGIN)
- ; SOURCE LINE # 432
- ; SOURCE LINE # 433
- ; SOURCE LINE # 437
- 0000 7D28 MOV R5,#028H
- 0002 7F7E MOV R7,#07EH
- 0004 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 439
- 0007 E4 CLR A
- 0008 F500 R MOV ulTemp0+03H,A
- 000A F500 R MOV ulTemp0+02H,A
- 000C F500 R MOV ulTemp0+01H,A
- 000E F500 R MOV ulTemp0,A
- ; SOURCE LINE # 440
- 0010 020000 R LJMP ?C0347
- 0013 ?C0044:
- ; SOURCE LINE # 442
- ; SOURCE LINE # 443
- 0013 E4 CLR A
- 0014 F500 R MOV ucResult,A
- ; SOURCE LINE # 444
- 0016 F500 R MOV ucPhase,A
- 0018 ?C0047:
- ; SOURCE LINE # 446
- ; SOURCE LINE # 447
- 0018 AD00 R MOV R5,ucPhase
- 001A 7F7D MOV R7,#07DH
- 001C 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 448
- 001F AD00 R MOV R5,ucDetect
- 0021 7F7F MOV R7,#07FH
- 0023 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 450
- 0026 120000 R LCALL Wait_Finish
- ; SOURCE LINE # 451
- 0029 E500 E MOV A,Data
- 002B 6002 JZ ?C0048
- 002D FF MOV R7,A
- 002E 22 RET
- 002F ?C0048:
- ; SOURCE LINE # 453
- 002F 7F01 MOV R7,#01H
- 0031 120000 R LCALL _Read_Auto_Info
- ; SOURCE LINE # 455
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 65
- 0034 120000 R LCALL L?0376
- 0037 120000 R LCALL L?0413
- 003A 501C JNC ?C0050
- ; SOURCE LINE # 456
- ; SOURCE LINE # 457
- 003C 850000 R MOV ulTemp0+03H,Data+07H
- 003F 850000 R MOV ulTemp0+02H,Data+06H
- 0042 850000 R MOV ulTemp0+01H,Data+05H
- 0045 850000 R MOV ulTemp0,Data+04H
- ; SOURCE LINE # 458
- 0048 850000 R MOV ucResult,ucPhase
- ; SOURCE LINE # 460
- 004B AF00 R MOV R7,ulTemp0+03H
- 004D AE00 R MOV R6,ulTemp0+02H
- 004F AD00 R MOV R5,ulTemp0+01H
- 0051 AC00 R MOV R4,ulTemp0
- 0053 120000 R LCALL L?0424
- 0056 4013 JC ?C0046
- ; SOURCE LINE # 461
- 0058 ?C0050:
- ; SOURCE LINE # 463
- 0058 E500 R MOV A,ucPhase
- 005A 7005 JNZ ?C0052
- ; SOURCE LINE # 464
- 005C 750001 R MOV ucPhase,#01H
- 005F 80B7 SJMP ?C0047
- 0061 ?C0052:
- ; SOURCE LINE # 465
- 0061 E500 R MOV A,ucPhase
- 0063 B40105 CJNE A,#01H,?C0046
- ; SOURCE LINE # 466
- 0066 750002 R MOV ucPhase,#02H
- 0069 80AD SJMP ?C0047
- ; SOURCE LINE # 468
- ; SOURCE LINE # 469
- ; SOURCE LINE # 470
- 006B ?C0046:
- ; SOURCE LINE # 472
- 006B E4 CLR A
- 006C FF MOV R7,A
- 006D FE MOV R6,A
- 006E FD MOV R5,A
- 006F FC MOV R4,A
- 0070 120000 R LCALL L?0413
- 0073 700B JNZ ?C0043
- 0075 E500 R MOV A,ucDetect
- 0077 B47B06 CJNE A,#07BH,?C0043
- 007A ?C0056:
- ; SOURCE LINE # 474
- 007A ?C0347:
- 007A 750077 R MOV ucDetect,#077H
- ; SOURCE LINE # 475
- ; SOURCE LINE # 476
- 007D 020000 R LJMP ?C0044
- 0080 ?C0043:
- ; SOURCE LINE # 478
- 0080 7F00 MOV R7,#00H
- ; SOURCE LINE # 479
- 0082 ?C0049:
- 0082 22 RET
- ; FUNCTION FindColor (END)
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 66
- ; FUNCTION _GetMaxSum (BEGIN)
- ; SOURCE LINE # 480
- 0000 8F00 R MOV select,R7
- ; SOURCE LINE # 481
- ; SOURCE LINE # 484
- 0002 E4 CLR A
- 0003 F500 R MOV ucPhase,A
- ; SOURCE LINE # 485
- 0005 F500 R MOV ulTemp0+03H,A
- 0007 F500 R MOV ulTemp0+02H,A
- 0009 F500 R MOV ulTemp0+01H,A
- 000B F500 R MOV ulTemp0,A
- ; SOURCE LINE # 486
- 000D AF00 R MOV R7,ucPhase
- 000F 120000 E LCALL _Set_Phase
- ; SOURCE LINE # 487
- 0012 E500 R MOV A,select
- 0014 7004 JNZ ?C0058
- 0016 7F77 MOV R7,#077H
- 0018 8002 SJMP ?C0059
- 001A ?C0058:
- 001A 7F7B MOV R7,#07BH
- 001C ?C0059:
- 001C 8F00 R MOV ucDetect,R7
- ; SOURCE LINE # 491
- 001E 7D07 MOV R5,#07H
- 0020 7F9E MOV R7,#09EH
- 0022 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 492
- 0025 120000 R LCALL Wait_For_IVS
- ; SOURCE LINE # 494
- 0028 AD00 R MOV R5,ucDetect
- 002A 7F7F MOV R7,#07FH
- 002C 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 496
- 002F 120000 R LCALL Wait_For_IVS
- ; SOURCE LINE # 497
- 0032 E4 CLR A
- 0033 F500 R MOV ucPhase,A
- 0035 ?C0060:
- ; SOURCE LINE # 498
- ; SOURCE LINE # 500
- 0035 120000 R LCALL Wait_For_IVS
- ; SOURCE LINE # 501
- 0038 7F01 MOV R7,#01H
- 003A 120000 R LCALL _Read_Auto_Info
- ; SOURCE LINE # 503
- 003D 120000 R LCALL L?0376
- 0040 AB00 R MOV R3,ulTemp0+03H
- 0042 AA00 R MOV R2,ulTemp0+02H
- 0044 A900 R MOV R1,ulTemp0+01H
- 0046 A800 R MOV R0,ulTemp0
- 0048 C3 CLR C
- 0049 120000 E LCALL ?C?ULCMP
- 004C 500F JNC ?C0062
- ; SOURCE LINE # 504
- ; SOURCE LINE # 505
- 004E E4 CLR A
- 004F F500 R MOV ulTemp0+03H,A
- 0051 E500 E MOV A,Data+06H
- 0053 F500 R MOV ulTemp0+02H,A
- 0055 E500 E MOV A,Data+05H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 67
- 0057 F500 R MOV ulTemp0+01H,A
- 0059 E500 E MOV A,Data+04H
- 005B F500 R MOV ulTemp0,A
- ; SOURCE LINE # 506
- ; SOURCE LINE # 507
- 005D ?C0062:
- 005D 0500 R INC ucPhase
- 005F E500 R MOV A,ucPhase
- 0061 C3 CLR C
- 0062 9404 SUBB A,#04H
- 0064 40CF JC ?C0060
- 0066 ?C0061:
- ; SOURCE LINE # 508
- 0066 E4 CLR A
- 0067 FD MOV R5,A
- 0068 7F9E MOV R7,#09EH
- 006A 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 509
- 006D 120000 R LCALL Wait_Finish
- ; SOURCE LINE # 510
- 0070 E500 E MOV A,Data
- 0072 6006 JZ ?C0064
- 0074 FF MOV R7,A
- 0075 E4 CLR A
- 0076 FC MOV R4,A
- 0077 FD MOV R5,A
- 0078 FE MOV R6,A
- 0079 22 RET
- 007A ?C0064:
- ; SOURCE LINE # 532
- 007A AF00 R MOV R7,ulTemp0+03H
- 007C AE00 R MOV R6,ulTemp0+02H
- 007E AD00 R MOV R5,ulTemp0+01H
- 0080 AC00 R MOV R4,ulTemp0
- ; SOURCE LINE # 533
- 0082 ?C0065:
- 0082 22 RET
- ; FUNCTION _GetMaxSum (END)
- ; FUNCTION _Auto_Clock_Do (BEGIN)
- ; SOURCE LINE # 544
- 0000 8F00 R MOV NM,R7
- ; SOURCE LINE # 545
- ; SOURCE LINE # 921
- 0002 120000 R LCALL L?0430
- ; SOURCE LINE # 922
- 0005 F500 R MOV ulSum+03H,A
- 0007 F500 R MOV ulSum+02H,A
- 0009 F500 R MOV ulSum+01H,A
- 000B F500 R MOV ulSum,A
- ; SOURCE LINE # 927
- 000D 120000 R LCALL _Measure_PositionV
- 0010 8F00 R MOV Result,R7
- ; SOURCE LINE # 929
- 0012 E500 R MOV A,Result
- 0014 30E701 JNB ACC.7,?C0066
- 0017 22 RET
- 0018 ?C0066:
- ; SOURCE LINE # 931
- 0018 7410 MOV A,#010H
- 001A 2500 R ADD A,NM
- 001C F500 R MOV NM,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 68
- ; SOURCE LINE # 933
- 001E 75000A R MOV count,#0AH
- 0021 ?C0070:
- ; SOURCE LINE # 935
- ; SOURCE LINE # 940
- ; SOURCE LINE # 942
- 0021 120000 R LCALL L?0434
- 0024 30E701 JNB ACC.7,?C0071
- 0027 ?C0348:
- 0027 22 RET
- 0028 ?C0071:
- ; SOURCE LINE # 944
- ; SOURCE LINE # 947
- 0028 120000 R LCALL L?0368
- 002B 5017 JNC ?C0072
- ; SOURCE LINE # 948
- 002D C3 CLR C
- 002E ED MOV A,R5
- 002F 7800 R MOV R0,#LOW usH_End+01H
- 0031 96 SUBB A,@R0
- 0032 FF MOV R7,A
- 0033 EC MOV A,R4
- 0034 120000 R LCALL L?0425
- 0037 4004 JC ?C0073
- 0039 7FFF MOV R7,#0FFH
- 003B 8003 SJMP ?C0074
- 003D ?C0073:
- 003D 120000 R LCALL L?0426
- 0040 ?C0074:
- 0040 8F00 R MOV delta,R7
- 0042 8019 SJMP ?C0075
- 0044 ?C0072:
- ; SOURCE LINE # 950
- 0044 C3 CLR C
- 0045 7900 R MOV R1,#LOW usH_End+01H
- 0047 E7 MOV A,@R1
- 0048 7800 E MOV R0,#LOW usIPH_ACT_WID+01H
- 004A 96 SUBB A,@R0
- 004B FF MOV R7,A
- 004C 19 DEC R1
- 004D E7 MOV A,@R1
- 004E 120000 R LCALL L?0425
- 0051 4004 JC ?C0076
- 0053 7FFF MOV R7,#0FFH
- 0055 8004 SJMP ?C0077
- 0057 ?C0076:
- 0057 120000 R LCALL L?0431
- 005A FF MOV R7,A
- 005B ?C0077:
- 005B 8F00 R MOV delta,R7
- 005D ?C0075:
- ; SOURCE LINE # 953
- 005D 7800 E MOV R0,#LOW usIPH_ACT_WID
- 005F E6 MOV A,@R0
- 0060 FA MOV R2,A
- 0061 08 INC R0
- 0062 E6 MOV A,@R0
- 0063 FB MOV R3,A
- 0064 7C00 MOV R4,#00H
- 0066 7D03 MOV R5,#03H
- 0068 FF MOV R7,A
- 0069 AE02 MOV R6,AR2
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 69
- 006B 120000 E LCALL ?C?UIDIV
- 006E C3 CLR C
- 006F EF MOV A,R7
- 0070 9500 R SUBB A,delta
- 0072 EE MOV A,R6
- 0073 9400 SUBB A,#00H
- 0075 5011 JNC ?C0078
- ; SOURCE LINE # 954
- ; SOURCE LINE # 955
- 0077 C3 CLR C
- 0078 7800 R MOV R0,#LOW usH_End+01H
- 007A E6 MOV A,@R0
- 007B 9B SUBB A,R3
- 007C 18 DEC R0
- 007D E6 MOV A,@R0
- 007E 9A SUBB A,R2
- 007F 5004 JNC ?C0079
- 0081 7FFA MOV R7,#0FAH
- 0083 8002 SJMP ?C0080
- 0085 ?C0079:
- 0085 7FFB MOV R7,#0FBH
- 0087 ?C0080:
- 0087 ?C0349:
- 0087 22 RET
- ; SOURCE LINE # 956
- 0088 ?C0078:
- ; SOURCE LINE # 958
- 0088 7401 MOV A,#01H
- 008A C3 CLR C
- 008B 9500 R SUBB A,delta
- 008D 504E JNC ?C0069
- 008F ?C0081:
- ; SOURCE LINE # 960
- 008F E500 R MOV A,delta
- 0091 13 RRC A
- 0092 13 RRC A
- 0093 543F ANL A,#03FH
- 0095 2500 R ADD A,delta
- 0097 F500 R MOV delta,A
- ; SOURCE LINE # 964
- 0099 C3 CLR C
- 009A 7900 R MOV R1,#LOW usH_End+01H
- 009C E7 MOV A,@R1
- 009D 7800 E MOV R0,#LOW usIPH_ACT_WID+01H
- 009F 96 SUBB A,@R0
- 00A0 19 DEC R1
- 00A1 E7 MOV A,@R1
- 00A2 18 DEC R0
- 00A3 96 SUBB A,@R0
- 00A4 5018 JNC ?C0082
- ; SOURCE LINE # 965
- ; SOURCE LINE # 966
- 00A6 C3 CLR C
- 00A7 74B2 MOV A,#0B2H
- 00A9 9500 E SUBB A,stMUD+02H
- 00AB C3 CLR C
- 00AC 9500 R SUBB A,delta
- 00AE 5003 JNC ?C0083
- 00B0 7FFA MOV R7,#0FAH
- 00B2 22 RET
- 00B3 ?C0083:
- ; SOURCE LINE # 968
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 70
- 00B3 E500 R MOV A,delta
- 00B5 2500 E ADD A,stMUD+02H
- 00B7 F500 E MOV stMUD+02H,A
- ; SOURCE LINE # 970
- ; SOURCE LINE # 971
- 00B9 120000 R LCALL L?0415
- ; SOURCE LINE # 972
- 00BC 8016 SJMP ?C0068
- 00BE ?C0082:
- ; SOURCE LINE # 974
- ; SOURCE LINE # 975
- 00BE E500 E MOV A,stMUD+02H
- 00C0 24B2 ADD A,#0B2H
- 00C2 C3 CLR C
- 00C3 9500 R SUBB A,delta
- 00C5 5003 JNC ?C0085
- 00C7 7FFB MOV R7,#0FBH
- 00C9 22 RET
- 00CA ?C0085:
- ; SOURCE LINE # 977
- 00CA C3 CLR C
- 00CB E500 E MOV A,stMUD+02H
- 00CD 9500 R SUBB A,delta
- 00CF F500 E MOV stMUD+02H,A
- ; SOURCE LINE # 979
- ; SOURCE LINE # 980
- 00D1 120000 R LCALL L?0416
- ; SOURCE LINE # 981
- ; SOURCE LINE # 1005
- 00D4 ?C0068:
- ; SOURCE LINE # 1006
- 00D4 1500 R DEC count
- 00D6 E500 R MOV A,count
- 00D8 6003 JZ $ + 5H
- 00DA 020000 R LJMP ?C0070
- 00DD ?C0069:
- ; SOURCE LINE # 1010
- 00DD E500 R MOV A,count
- 00DF 7003 JNZ ?C0086
- 00E1 7FFD MOV R7,#0FDH
- 00E3 22 RET
- 00E4 ?C0086:
- ; SOURCE LINE # 1012
- 00E4 E4 CLR A
- 00E5 F500 R MOV stop,A
- 00E7 ?C0087:
- ; SOURCE LINE # 1014
- ; SOURCE LINE # 1015
- ; SOURCE LINE # 1016
- 00E7 750010 R MOV count,#010H
- ; SOURCE LINE # 1017
- 00EA 7500FF R MOV delta,#0FFH
- 00ED ?C0089:
- ; SOURCE LINE # 1019
- ; SOURCE LINE # 1020
- ; SOURCE LINE # 1023
- 00ED AF00 R MOV R7,count
- 00EF 120000 E LCALL _Set_Phase
- ; SOURCE LINE # 1026
- ; SOURCE LINE # 1028
- 00F2 120000 R LCALL L?0434
- 00F5 30E716 JNB ACC.7,?C0091
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 71
- ; SOURCE LINE # 1029
- ; SOURCE LINE # 1030
- 00F8 B4F80B CJNE A,#0F8H,?C0092
- ; SOURCE LINE # 1031
- ; SOURCE LINE # 1033
- 00FB E500 R MOV A,count
- 00FD B47002 CJNE A,#070H,?C0093
- ; SOURCE LINE # 1034
- ; SOURCE LINE # 1035
- ; SOURCE LINE # 1036
- 0100 8032 SJMP ?C0350
- ; SOURCE LINE # 1037
- 0102 ?C0093:
- ; SOURCE LINE # 1039
- ; SOURCE LINE # 1040
- 0102 7420 MOV A,#020H
- ; SOURCE LINE # 1041
- 0104 8037 SJMP ?C0351
- ; SOURCE LINE # 1042
- ; SOURCE LINE # 1043
- 0106 ?C0092:
- ; SOURCE LINE # 1045
- 0106 AF00 E MOV R7,stMUD+03H
- 0108 120000 E LCALL _Set_Phase
- ; SOURCE LINE # 1047
- 010B AF00 R MOV R7,Result
- 010D 22 RET
- ; SOURCE LINE # 1048
- 010E ?C0091:
- ; SOURCE LINE # 1050
- ; SOURCE LINE # 1054
- 010E 120000 R LCALL L?0368
- 0111 500A JNC ?C0095
- 0113 120000 R LCALL L?0426
- 0116 C3 CLR C
- 0117 7480 MOV A,#080H
- 0119 9F SUBB A,R7
- 011A FF MOV R7,A
- 011B 8006 SJMP ?C0096
- 011D ?C0095:
- 011D 120000 R LCALL L?0431
- 0120 2480 ADD A,#080H
- 0122 FF MOV R7,A
- 0123 ?C0096:
- 0123 8F00 R MOV Result,R7
- ; SOURCE LINE # 1056
- 0125 E500 R MOV A,Result
- 0127 C3 CLR C
- 0128 9500 R SUBB A,delta
- 012A 5003 JNC ?C0097
- ; SOURCE LINE # 1057
- ; SOURCE LINE # 1058
- 012C 850000 R MOV delta,Result
- ; SOURCE LINE # 1059
- 012F ?C0097:
- ; SOURCE LINE # 1061
- 012F E500 R MOV A,count
- 0131 B47007 CJNE A,#070H,?C0098
- ; SOURCE LINE # 1062
- ; SOURCE LINE # 1063
- 0134 ?C0350:
- 0134 AF00 E MOV R7,stMUD+03H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 72
- 0136 120000 E LCALL _Set_Phase
- ; SOURCE LINE # 1064
- 0139 8009 SJMP ?C0090
- ; SOURCE LINE # 1065
- 013B ?C0098:
- ; SOURCE LINE # 1067
- 013B 7410 MOV A,#010H
- 013D ?C0351:
- 013D 2500 R ADD A,count
- 013F F500 R MOV count,A
- ; SOURCE LINE # 1068
- 0141 020000 R LJMP ?C0089
- 0144 ?C0090:
- ; SOURCE LINE # 1070
- 0144 7481 MOV A,#081H
- 0146 C3 CLR C
- 0147 9500 R SUBB A,delta
- 0149 500B JNC ?C0099
- ; SOURCE LINE # 1071
- ; SOURCE LINE # 1072
- 014B 1500 E DEC stMUD+02H
- ; SOURCE LINE # 1074
- ; SOURCE LINE # 1075
- 014D 120000 R LCALL L?0416
- ; SOURCE LINE # 1077
- 0150 750001 R MOV stop,#01H
- ; SOURCE LINE # 1078
- 0153 020000 R LJMP ?C0087
- 0156 ?C0099:
- ; SOURCE LINE # 1079
- 0156 7480 MOV A,#080H
- 0158 D3 SETB C
- 0159 9500 R SUBB A,delta
- 015B 4016 JC ?C0088
- ; SOURCE LINE # 1080
- ; SOURCE LINE # 1081
- 015D E500 R MOV A,stop
- 015F 6006 JZ ?C0102
- 0161 E500 R MOV A,delta
- 0163 647F XRL A,#07FH
- 0165 600C JZ ?C0088
- 0167 ?C0102:
- ; SOURCE LINE # 1083
- 0167 0500 E INC stMUD+02H
- ; SOURCE LINE # 1085
- ; SOURCE LINE # 1086
- 0169 120000 R LCALL L?0415
- ; SOURCE LINE # 1088
- 016C E500 R MOV A,stop
- 016E 7003 JNZ $ + 5H
- 0170 020000 R LJMP ?C0087
- ; SOURCE LINE # 1089
- ; SOURCE LINE # 1091
- ; SOURCE LINE # 1092
- 0173 ?C0088:
- ; SOURCE LINE # 1094
- 0173 850000 R MOV count,stMUD+03H
- ; SOURCE LINE # 1095
- 0176 850000 R MOV start,stMUD+02H
- ; SOURCE LINE # 1098
- 0179 120000 R LCALL FindColor
- 017C EF MOV A,R7
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 73
- 017D 6003 JZ ?C0105
- 017F 7FFF MOV R7,#0FFH
- 0181 22 RET
- 0182 ?C0105:
- ; SOURCE LINE # 1100
- 0182 7D30 MOV R5,#030H
- 0184 7F7E MOV R7,#07EH
- 0186 120000 E LCALL _RTDSetByte
- ; SOURCE LINE # 1102
- 0189 7F01 MOV R7,#01H
- 018B 120000 R LCALL _GetMaxSum
- 018E 8F00 R MOV ulSum+03H,R7
- 0190 8E00 R MOV ulSum+02H,R6
- 0192 8D00 R MOV ulSum+01H,R5
- 0194 8C00 R MOV ulSum,R4
- ; SOURCE LINE # 1103
- 0196 E4 CLR A
- 0197 FF MOV R7,A
- 0198 120000 R LCALL _GetMaxSum
- 019B 8F00 R MOV ulCompare+03H,R7
- 019D 8E00 R MOV ulCompare+02H,R6
- 019F 8D00 R MOV ulCompare+01H,R5
- 01A1 8C00 R MOV ulCompare,R4
- ; SOURCE LINE # 1107
- 01A3 7FE0 MOV R7,#0E0H
- 01A5 7E04 MOV R6,#04H
- 01A7 7D07 MOV R5,#07H
- 01A9 7C00 MOV R4,#00H
- 01AB AB00 R MOV R3,ulSum+03H
- 01AD AA00 R MOV R2,ulSum+02H
- 01AF A900 R MOV R1,ulSum+01H
- 01B1 A800 R MOV R0,ulSum
- 01B3 D3 SETB C
- 01B4 120000 E LCALL ?C?ULCMP
- 01B7 5023 JNC ?C0107
- 01B9 7FE0 MOV R7,#0E0H
- 01BB 7E04 MOV R6,#04H
- 01BD 7D07 MOV R5,#07H
- 01BF 7C00 MOV R4,#00H
- 01C1 A800 R MOV R0,ulSum
- 01C3 C3 CLR C
- 01C4 120000 E LCALL ?C?ULCMP
- 01C7 4003 JC $ + 5H
- 01C9 020000 R LJMP ?C0106
- 01CC 7F80 MOV R7,#080H
- 01CE 7E84 MOV R6,#084H
- 01D0 7D1E MOV R5,#01EH
- 01D2 7C00 MOV R4,#00H
- 01D4 120000 R LCALL L?0404
- 01D7 120000 E LCALL ?C?ULCMP
- 01DA 4079 JC ?C0106
- 01DC ?C0107:
- ; SOURCE LINE # 1108
- ; SOURCE LINE # 1110
- 01DC 120000 R LCALL L?0430
- ; SOURCE LINE # 1113
- 01DF E500 R MOV A,start
- 01E1 24FE ADD A,#0FEH
- 01E3 FF MOV R7,A
- 01E4 7480 MOV A,#080H
- 01E6 C3 CLR C
- 01E7 9F SUBB A,R7
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 74
- 01E8 4007 JC ?C0109
- 01EA 7480 MOV A,#080H
- 01EC D3 SETB C
- 01ED 9500 R SUBB A,start
- 01EF 401F JC ?C0108
- 01F1 ?C0109:
- ; SOURCE LINE # 1114
- ; SOURCE LINE # 1115
- 01F1 750080 E MOV stMUD+02H,#080H
- ; SOURCE LINE # 1116
- 01F4 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1117
- 01F7 120000 E LCALL Set_Clock
- ; SOURCE LINE # 1118
- 01FA 120000 R LCALL L?0385
- ; SOURCE LINE # 1120
- 01FD 120000 R LCALL L?0404
- 0200 C3 CLR C
- 0201 120000 E LCALL ?C?ULCMP
- 0204 5003 JNC ?C0110
- ; SOURCE LINE # 1121
- ; SOURCE LINE # 1122
- ; SOURCE LINE # 1123
- 0206 120000 R LCALL L?0396
- ; SOURCE LINE # 1124
- 0209 ?C0110:
- ; SOURCE LINE # 1126
- 0209 E500 R MOV A,start
- 020B 04 INC A
- 020C F500 E MOV stMUD+02H,A
- ; SOURCE LINE # 1127
- 020E 800B SJMP ?C0112
- 0210 ?C0108:
- ; SOURCE LINE # 1129
- ; SOURCE LINE # 1130
- 0210 850000 E MOV stMUD+02H,start
- ; SOURCE LINE # 1131
- 0213 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1132
- 0216 120000 E LCALL Set_Clock
- ; SOURCE LINE # 1133
- ; SOURCE LINE # 1134
- 0219 8024 SJMP ?C0352
- 021B ?C0112:
- ; SOURCE LINE # 1138
- ; SOURCE LINE # 1139
- ; SOURCE LINE # 1140
- 021B AF00 R MOV R7,ulSum+03H
- 021D AE00 R MOV R6,ulSum+02H
- 021F AD00 R MOV R5,ulSum+01H
- 0221 AC00 R MOV R4,ulSum
- 0223 120000 R LCALL L?0405
- 0226 C3 CLR C
- 0227 120000 E LCALL ?C?ULCMP
- 022A 5003 JNC ?C0114
- ; SOURCE LINE # 1141
- ; SOURCE LINE # 1142
- ; SOURCE LINE # 1143
- 022C 120000 R LCALL L?0396
- ; SOURCE LINE # 1144
- 022F ?C0114:
- ; SOURCE LINE # 1145
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 75
- 022F E500 R MOV A,start
- 0231 24FE ADD A,#0FEH
- 0233 6500 E XRL A,stMUD+02H
- 0235 600D JZ ?C0113
- ; SOURCE LINE # 1146
- 0237 ?C0115:
- ; SOURCE LINE # 1148
- 0237 1500 E DEC stMUD+02H
- ; SOURCE LINE # 1149
- 0239 120000 E LCALL Set_Clock
- ; SOURCE LINE # 1150
- 023C 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1151
- 023F ?C0352:
- 023F 120000 R LCALL L?0385
- ; SOURCE LINE # 1152
- 0242 80D7 SJMP ?C0112
- 0244 ?C0113:
- ; SOURCE LINE # 1154
- 0244 850000 E MOV stMUD+02H,Result
- ; SOURCE LINE # 1155
- 0247 850000 E MOV stMUD+03H,count
- ; SOURCE LINE # 1156
- 024A 120000 E LCALL Set_Clock
- ; SOURCE LINE # 1157
- 024D 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1158
- 0250 AF00 E MOV R7,stMUD+03H
- 0252 120000 E LCALL _Set_Phase
- ; SOURCE LINE # 1159
- 0255 ?C0106:
- ; SOURCE LINE # 1164
- 0255 741C MOV A,#01CH
- 0257 D3 SETB C
- 0258 9500 E SUBB A,stMUD+02H
- 025A 4004 JC ?C0116
- 025C 7FFB MOV R7,#0FBH
- 025E 800D SJMP ?C0117
- 0260 ?C0116:
- 0260 74E4 MOV A,#0E4H
- 0262 C3 CLR C
- 0263 9500 E SUBB A,stMUD+02H
- 0265 5004 JNC ?C0118
- 0267 7FFA MOV R7,#0FAH
- 0269 8002 SJMP ?C0119
- 026B ?C0118:
- 026B 7F00 MOV R7,#00H
- 026D ?C0119:
- 026D ?C0117:
- ; SOURCE LINE # 1165
- 026D ?C0067:
- 026D 22 RET
- 026E L?0385:
- 026E E4 CLR A
- 026F FF MOV R7,A
- 0270 120000 R LCALL _GetMaxSum
- 0273 8F00 R MOV ulSum+03H,R7
- 0275 8E00 R MOV ulSum+02H,R6
- 0277 8D00 R MOV ulSum+01H,R5
- 0279 8C00 R MOV ulSum,R4
- 027B 22 RET
- 027C L?0415:
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 76
- 027C 120000 E LCALL Set_Clock
- 027F 120000 E LCALL Set_H_Position
- 0282 22 RET
- 0283 L?0416:
- 0283 120000 E LCALL Set_H_Position
- 0286 120000 E LCALL Set_Clock
- 0289 22 RET
- 028A L?0434:
- 028A AF00 R MOV R7,NM
- 028C 120000 R LCALL _Measure_PositionH
- 028F 8F00 R MOV Result,R7
- 0291 E500 R MOV A,Result
- 0293 22 RET
- ; FUNCTION _Auto_Clock_Do (END)
- ; FUNCTION Auto_Position (BEGIN)
- ; SOURCE LINE # 1170
- ; SOURCE LINE # 1171
- ; SOURCE LINE # 1174
- 0000 D200 R SETB bAutoInProgress
- ; SOURCE LINE # 1176
- 0002 850000 R MOV Curr_PosH,stMUD
- ; SOURCE LINE # 1177
- 0005 850000 R MOV Curr_PosV,stMUD+01H
- ; SOURCE LINE # 1179
- 0008 120000 R LCALL L?0397
- 000B 5005 JNC ?C0120
- ; SOURCE LINE # 1180
- ; SOURCE LINE # 1181
- 000D 8F00 E MOV stMUD+01H,R7
- ; SOURCE LINE # 1182
- 000F 120000 E LCALL Set_V_Position
- ; SOURCE LINE # 1183
- 0012 ?C0120:
- ; SOURCE LINE # 1185
- 0012 7E00 R MOV R6,#HIGH ADC_DEFAULT
- 0014 7F00 R MOV R7,#LOW ADC_DEFAULT
- 0016 120000 E LCALL _RTDCodeW
- ; SOURCE LINE # 1190
- 0019 120000 R LCALL Min_Noise_Margin
- 001C 8F00 R MOV Result,R7
- ; SOURCE LINE # 1192
- 001E E500 R MOV A,Result
- 0020 20E707 JB ACC.7,?C0121
- ; SOURCE LINE # 1193
- ; SOURCE LINE # 1197
- 0023 AF00 E MOV R7,Data
- 0025 120000 R LCALL _Auto_Position_Do
- 0028 8F00 R MOV Result,R7
- ; SOURCE LINE # 1198
- 002A ?C0121:
- ; SOURCE LINE # 1200
- 002A E500 R MOV A,Result
- 002C 20E709 JB ACC.7,?C0122
- ; SOURCE LINE # 1201
- ; SOURCE LINE # 1202
- 002F 7800 E MOV R0,#LOW ucMode_Curr
- 0031 E6 MOV A,@R0
- 0032 FF MOV R7,A
- 0033 120000 E LCALL _Save_MUD
- ; SOURCE LINE # 1203
- 0036 800C SJMP ?C0123
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 77
- 0038 ?C0122:
- ; SOURCE LINE # 1205
- ; SOURCE LINE # 1206
- 0038 850000 E MOV stMUD,Curr_PosH
- ; SOURCE LINE # 1207
- 003B 850000 E MOV stMUD+01H,Curr_PosV
- ; SOURCE LINE # 1209
- 003E 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1210
- 0041 120000 E LCALL Set_V_Position
- ; SOURCE LINE # 1211
- 0044 ?C0123:
- ; SOURCE LINE # 1214
- 0044 120000 E LCALL SetADC_GainOffset
- ; SOURCE LINE # 1216
- 0047 C200 R CLR bAutoInProgress
- ; SOURCE LINE # 1218
- 0049 AF00 R MOV R7,Result
- ; SOURCE LINE # 1219
- 004B ?C0124:
- 004B 22 RET
- ; FUNCTION Auto_Position (END)
- ; FUNCTION _Auto_Position_Do (BEGIN)
- ; SOURCE LINE # 1234
- 0000 8F00 R MOV NM,R7
- ; SOURCE LINE # 1235
- ; SOURCE LINE # 1261
- 0002 120000 R LCALL _Measure_PositionN
- 0005 8F00 R MOV Result,R7
- ; SOURCE LINE # 1263
- 0007 E500 R MOV A,Result
- 0009 30E701 JNB ACC.7,?C0125
- 000C 22 RET
- 000D ?C0125:
- ; SOURCE LINE # 1264
- 000D E4 CLR A
- 000E F500 R MOV Result,A
- ; SOURCE LINE # 1269
- 0010 750001 R MOV NM,#01H
- 0013 ?C0127:
- ; SOURCE LINE # 1270
- ; SOURCE LINE # 1271
- ; SOURCE LINE # 1272
- 0013 7800 E MOV R0,#LOW ucV_Max_Margin
- 0015 E6 MOV A,@R0
- 0016 7800 E MOV R0,#LOW usIPV_ACT_STA+01H
- 0018 120000 R LCALL L?0375
- 001B CF XCH A,R7
- 001C 34FF ADDC A,#0FFH
- 001E FE MOV R6,A
- 001F 7800 R MOV R0,#LOW usVer_Start
- 0021 120000 R LCALL L?0369
- 0024 402C JC ?C0129
- ; SOURCE LINE # 1273
- ; SOURCE LINE # 1274
- 0026 7800 E MOV R0,#LOW ucV_Min_Margin
- 0028 E6 MOV A,@R0
- 0029 7800 E MOV R0,#LOW usIPV_ACT_STA+01H
- 002B 120000 R LCALL L?0375
- 002E CF XCH A,R7
- 002F 34FF ADDC A,#0FFH
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 78
- 0031 FE MOV R6,A
- 0032 D3 SETB C
- 0033 EF MOV A,R7
- 0034 9D SUBB A,R5
- 0035 EE MOV A,R6
- 0036 9C SUBB A,R4
- 0037 5014 JNC ?C0130
- ; SOURCE LINE # 1275
- ; SOURCE LINE # 1276
- 0039 7800 R MOV R0,#LOW usVer_Start+01H
- 003B E6 MOV A,@R0
- 003C 2480 ADD A,#080H
- 003E FF MOV R7,A
- 003F 7800 E MOV R0,#LOW usIPV_ACT_STA+01H
- 0041 E6 MOV A,@R0
- 0042 FE MOV R6,A
- 0043 C3 CLR C
- 0044 EF MOV A,R7
- 0045 9E SUBB A,R6
- 0046 F500 E MOV stMUD+01H,A
- ; SOURCE LINE # 1277
- 0048 120000 E LCALL Set_V_Position
- ; SOURCE LINE # 1279
- 004B 8023 SJMP ?C0128
- ; SOURCE LINE # 1280
- 004D ?C0130:
- ; SOURCE LINE # 1282
- 004D 430002 R ORL Result,#02H
- ; SOURCE LINE # 1283
- 0050 8003 SJMP ?C0132
- 0052 ?C0129:
- ; SOURCE LINE # 1285
- 0052 430001 R ORL Result,#01H
- 0055 ?C0132:
- ; SOURCE LINE # 1288
- 0055 E500 R MOV A,NM
- 0057 6014 JZ ?C0133
- 0059 7800 E MOV R0,#LOW usIPV_ACT_LEN
- 005B E6 MOV A,@R0
- 005C FE MOV R6,A
- 005D 08 INC R0
- 005E E6 MOV A,@R0
- 005F 7800 R MOV R0,#LOW usVer_End
- 0061 120000 R LCALL L?0427
- 0064 4007 JC ?C0133
- ; SOURCE LINE # 1289
- ; SOURCE LINE # 1290
- 0066 7800 R MOV R0,#LOW usVer_Start+01H
- ; SOURCE LINE # 1291
- 0068 120000 R LCALL L?0394
- ; SOURCE LINE # 1292
- 006B 80A6 SJMP ?C0127
- 006D ?C0133:
- ; SOURCE LINE # 1294
- ; SOURCE LINE # 1295
- 006D 430004 R ORL Result,#04H
- ; SOURCE LINE # 1296
- ; SOURCE LINE # 1297
- ; SOURCE LINE # 1298
- 0070 ?C0128:
- ; SOURCE LINE # 1303
- 0070 750001 R MOV NM,#01H
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 79
- 0073 ?C0135:
- ; SOURCE LINE # 1304
- ; SOURCE LINE # 1305
- ; SOURCE LINE # 1308
- 0073 E500 E MOV A,stMUD+02H
- 0075 13 RRC A
- 0076 13 RRC A
- 0077 543F ANL A,#03FH
- 0079 7800 E MOV R0,#LOW usIPH_ACT_STA+01H
- 007B 26 ADD A,@R0
- 007C FF MOV R7,A
- 007D E4 CLR A
- 007E 18 DEC R0
- 007F 36 ADDC A,@R0
- 0080 FE MOV R6,A
- 0081 7800 E MOV R0,#LOW ucH_Max_Margin
- 0083 E6 MOV A,@R0
- 0084 7C00 MOV R4,#00H
- 0086 2F ADD A,R7
- 0087 FF MOV R7,A
- 0088 EC MOV A,R4
- 0089 3E ADDC A,R6
- 008A CF XCH A,R7
- 008B 2460 ADD A,#060H
- 008D CF XCH A,R7
- 008E 34FF ADDC A,#0FFH
- 0090 FE MOV R6,A
- 0091 7800 R MOV R0,#LOW usH_Start
- 0093 120000 R LCALL L?0369
- 0096 4063 JC ?C0137
- ; SOURCE LINE # 1309
- ; SOURCE LINE # 1312
- 0098 7800 E MOV R0,#LOW ucH_Min_Margin
- 009A E6 MOV A,@R0
- 009B FF MOV R7,A
- 009C D3 SETB C
- 009D 9480 SUBB A,#080H
- 009F 5015 JNC ?C0138
- ; SOURCE LINE # 1313
- 00A1 E500 E MOV A,stMUD
- 00A3 FB MOV R3,A
- 00A4 C3 CLR C
- 00A5 ED MOV A,R5
- 00A6 9B SUBB A,R3
- 00A7 FB MOV R3,A
- 00A8 EC MOV A,R4
- 00A9 9400 SUBB A,#00H
- 00AB CB XCH A,R3
- 00AC 24B2 ADD A,#0B2H
- 00AE F500 E MOV Data+01H,A
- 00B0 E4 CLR A
- 00B1 3B ADDC A,R3
- 00B2 F500 E MOV Data,A
- 00B4 8004 SJMP ?C0139
- 00B6 ?C0138:
- ; SOURCE LINE # 1315
- 00B6 8C00 E MOV Data,R4
- 00B8 8D00 E MOV Data+01H,R5
- 00BA ?C0139:
- ; SOURCE LINE # 1318
- 00BA E500 E MOV A,stMUD+02H
- 00BC 13 RRC A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 80
- 00BD 13 RRC A
- 00BE 543F ANL A,#03FH
- 00C0 FE MOV R6,A
- 00C1 7800 E MOV R0,#LOW usIPH_ACT_STA+01H
- 00C3 26 ADD A,@R0
- 00C4 FD MOV R5,A
- 00C5 E4 CLR A
- 00C6 18 DEC R0
- 00C7 36 ADDC A,@R0
- 00C8 FC MOV R4,A
- 00C9 EF MOV A,R7
- 00CA 7A00 MOV R2,#00H
- 00CC 2D ADD A,R5
- 00CD FD MOV R5,A
- 00CE EA MOV A,R2
- 00CF 3C ADDC A,R4
- 00D0 CD XCH A,R5
- 00D1 2460 ADD A,#060H
- 00D3 CD XCH A,R5
- 00D4 34FF ADDC A,#0FFH
- 00D6 FC MOV R4,A
- 00D7 D3 SETB C
- 00D8 ED MOV A,R5
- 00D9 9500 E SUBB A,Data+01H
- 00DB EC MOV A,R4
- 00DC 9500 E SUBB A,Data
- 00DE 5016 JNC ?C0140
- ; SOURCE LINE # 1319
- ; SOURCE LINE # 1321
- 00E0 7800 R MOV R0,#LOW usH_Start+01H
- 00E2 E6 MOV A,@R0
- 00E3 24A0 ADD A,#0A0H
- 00E5 FF MOV R7,A
- 00E6 7800 E MOV R0,#LOW usIPH_ACT_STA+01H
- 00E8 E6 MOV A,@R0
- 00E9 FD MOV R5,A
- 00EA C3 CLR C
- 00EB EF MOV A,R7
- 00EC 9D SUBB A,R5
- 00ED C3 CLR C
- 00EE 9E SUBB A,R6
- 00EF F500 E MOV stMUD,A
- ; SOURCE LINE # 1322
- 00F1 120000 E LCALL Set_H_Position
- ; SOURCE LINE # 1324
- 00F4 8024 SJMP ?C0136
- ; SOURCE LINE # 1325
- 00F6 ?C0140:
- ; SOURCE LINE # 1327
- 00F6 430010 R ORL Result,#010H
- ; SOURCE LINE # 1328
- 00F9 8003 SJMP ?C0142
- 00FB ?C0137:
- ; SOURCE LINE # 1330
- 00FB 430008 R ORL Result,#08H
- 00FE ?C0142:
- ; SOURCE LINE # 1360
- 00FE E500 R MOV A,NM
- 0100 6015 JZ ?C0143
- 0102 7800 E MOV R0,#LOW usIPH_ACT_WID
- 0104 E6 MOV A,@R0
- 0105 FE MOV R6,A
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 81
- 0106 08 INC R0
- 0107 E6 MOV A,@R0
- 0108 7800 R MOV R0,#LOW usH_End
- 010A 120000 R LCALL L?0427
- 010D 4008 JC ?C0143
- ; SOURCE LINE # 1361
- ; SOURCE LINE # 1362
- 010F 7800 R MOV R0,#LOW usH_Start+01H
- ; SOURCE LINE # 1363
- 0111 120000 R LCALL L?0394
- ; SOURCE LINE # 1364
- 0114 020000 R LJMP ?C0135
- 0117 ?C0143:
- ; SOURCE LINE # 1366
- ; SOURCE LINE # 1367
- 0117 430020 R ORL Result,#020H
- ; SOURCE LINE # 1368
- ; SOURCE LINE # 1369
- ; SOURCE LINE # 1370
- 011A ?C0136:
- ; SOURCE LINE # 1388
- 011A AF00 R MOV R7,Result
- ; SOURCE LINE # 1389
- 011C ?C0126:
- 011C 22 RET
- ; FUNCTION _Auto_Position_Do (END)
- ; FUNCTION Min_Noise_Margin (BEGIN)
- ; SOURCE LINE # 1391
- ; SOURCE LINE # 1392
- ; SOURCE LINE # 1396
- 0000 7F30 MOV R7,#030H
- 0002 120000 R LCALL _Measure_PositionV
- ;---- Variable 'Result' assigned to Register 'R7' ----
- ; SOURCE LINE # 1398
- 0005 EF MOV A,R7
- 0006 30E701 JNB ACC.7,?C0145
- 0009 22 RET
- 000A ?C0145:
- ; SOURCE LINE # 1400
- 000A 7800 R MOV R0,#LOW usVer_Start+01H
- 000C E6 MOV A,@R0
- 000D 18 DEC R0
- 000E 46 ORL A,@R0
- 000F 700A JNZ ?C0147
- ; SOURCE LINE # 1401
- ; SOURCE LINE # 1402
- 0011 7F50 MOV R7,#050H
- 0013 120000 R LCALL _Measure_PositionV
- ; SOURCE LINE # 1403
- 0016 EF MOV A,R7
- 0017 30E701 JNB ACC.7,?C0147
- 001A ?C0353:
- 001A 22 RET
- ; SOURCE LINE # 1404
- 001B ?C0147:
- ; SOURCE LINE # 1406
- 001B E4 CLR A
- 001C F500 R MOV Noise,A
- ; SOURCE LINE # 1407
- 001E AF00 R MOV R7,Noise
- 0020 120000 R LCALL _Measure_PositionH
- C51 COMPILER V7.06 LCD_AUTO 11/21/2005 13:47:25 PAGE 82
- ; SOURCE LINE # 1408
- 0023 EF MOV A,R7
- 0024 30E701 JNB ACC.7,?C0149
- 0027 ?C0354:
- 0027 22 RET
- 0028 ?C0149:
- ; SOURCE LINE # 1410
- ; SOURCE LINE # 1411
- 0028 120000 R LCALL L?0390
- 002B ?C0152:
- ; SOURCE LINE # 1414
- ; SOURCE LINE # 1415
- ; SOURCE LINE # 1416
- ; SOURCE LINE # 1418
- 002B 120000 R LCALL L?0422