⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd_msg.lst

📁 液晶显示器程序代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 500   2          }
 501   1      
 502   1          switch (message)
 503   1          {
 504   2          case NOTIFY_CLEAR_OSD :
 505   2      //        if (ucOSD_Page_Index && SOURCE_TV != (stGUD1.INPUT_SOURCE & 0x07))
 506   2              if ((ucOSD_Page_Index) || (b_rgb_VOLUME_STATUS))
 507   2              {
 508   3                  // OSD time-out
 509   3                  ucOSD_Page_Index    = 0;
 510   3                  ucOSD_Item_Index0   = 0;
 511   3                  ucOSD_Item_Index1   = 0;
 512   3                  ucOSD_Item_Index2   = 0;
 513   3      
 514   3                  b_rgb_VOLUME_STATUS = 0;  // echo add 04/05/18
 515   3      
 516   3                  RTDSetByte(HOSTCTRL_02, 0x40);  // Wake RTD up
 517   3      
 518   3                  // Although you can add ending animation here, I don't think it is necessary.
 519   3                                      RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
 520   3                  RTDOSDW(OSD_Reset);            // Clear OSD
 521   3              }
 522   2              break;
 523   2      /*
 524   2          case NOTIFY_EXIT_KEY :
 525   2                  ucOSD_Page_Index    = 0;
 526   2                  ucOSD_Item_Index0   = 0;
 527   2                  ucOSD_Item_Index1   = 0;
 528   2                  ucOSD_Item_Index2   = 0;
 529   2      
 530   2                  b_rgb_VOLUME_STATUS = 0;  // echo add 04/05/18
 531   2      
 532   2                  RTDSetByte(HOSTCTRL_02, 0x40);  // Wake RTD up
 533   2      
 534   2                  // Although you can add ending animation here, I don't think it is necessary.
 535   2                                      RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);
 536   2                  RTDOSDW(OSD_Reset);            // Clear OSD
 537   2              break;
 538   2      */
 539   2      
 540   2      /*
 541   2          case NOTIFY_EXIT_KEY :
 542   2              break;
 543   2      */
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 10  

 544   2          case NOTIFY_MENU_KEY :
 545   2          case NOTIFY_IR_SOURCE :
 546   2              if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07))
 547   2              {
 548   3      #if (TMDS_ENABLE) 
 549   3                  Change_Source(SOURCE_DVI);
 550   3      #else
                          Change_Source(SOURCE_AV);
              #endif
 553   3              }
 554   2              else if (SOURCE_DVI == (stGUD1.INPUT_SOURCE & 0x07))
 555   2                  Change_Source(SOURCE_AV);
 556   2              else if (SOURCE_AV == (stGUD1.INPUT_SOURCE & 0x07))
 557   2                  Change_Source(SOURCE_SV);
 558   2              else if (SOURCE_SV == (stGUD1.INPUT_SOURCE & 0x07))
 559   2              {
 560   3      #if (VIDEO_CHIP == VDC_SAA7118)
                          Change_Source(SOURCE_YUV);
              #else
 563   3                  Change_Source(SOURCE_TV);
 564   3      #endif
 565   3              }
 566   2              else if (SOURCE_YUV == (stGUD1.INPUT_SOURCE & 0x07))
 567   2              {
 568   3                  Change_Source(SOURCE_TV);
 569   3              }
 570   2              else
 571   2              {
 572   3                  Change_Source(SOURCE_VGA);
 573   3              }
 574   2              break;
 575   2      
 576   2          default :
 577   2              {
 578   3                  // Save the current OSD page index
 579   3                  unsigned char   ucPage_Curr     = ucOSD_Page_Index;
 580   3      
 581   3                  // Send messages to OSD process
 582   3                  //(*OSD_Proc[ucOSD_Page_Index][stGUD1.INPUT_SOURCE & 0x07])(message);
 583   3                  OSD_Proc(message);
 584   3      
 585   3                  // If OSD page is changed ...
 586   3                  if (ucPage_Curr != ucOSD_Page_Index)
 587   3                  {
 588   4                      if (ucOSD_Page_Index)
 589   4                      {
 590   5                          if (0 == ucPage_Curr)
 591   5                          {
 592   6                              // ucOSD_Page_Index becomes non-zero value from zero. It is the first show of OSD.
 593   6                              // Maybe RTD3001 is still in power-saving mode, or we are showing some text on scr
             -een,
 594   6                              // like "No Signal". So we must wake up RTD3001 and clear screen before we display
             - OSD.
 595   6                              RTDSetByte(HOSTCTRL_02, 0x40);
 596   6                              RTDSetBit(VDIS_CTRL_20, 0xff, 0x01);
 597   6                                                      RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);     
 598   6                              RTDOSDW(OSD_Reset);
 599   6                          }
 600   5      
 601   5                          //(*OSD_Proc[ucOSD_Page_Index][stGUD1.INPUT_SOURCE & 0x07])(NOTIFY_SHOW);
 602   5                          OSD_Proc(NOTIFY_SHOW);
 603   5      
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 11  

 604   5                                              if (0 == ucPage_Curr)
 605   5                                              {
 606   6                                                      //RTDCodeW(OSD_Enable);
 607   6                                                      //RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
 608   6      
 609   6                                                      OSD_Opening();
 610   6                                              }
 611   5                      }
 612   4                      else
 613   4                      {
 614   5                          // OSD should be cleared when ucOSD_Page_Index becomes 0. 
 615   5                          // Clear other OSD status registers for safety
 616   5                          ucOSD_Item_Index0   = 0;
 617   5                          ucOSD_Item_Index1   = 0;
 618   5                          ucOSD_Item_Index2   = 0;
 619   5      
 620   5                          RTDSetByte(HOSTCTRL_02, 0x40);  // Wake RTD up
 621   5      
 622   5                          OSD_Ending();
 623   5                                              //RTDSetBit(OVL_CTRL_6D, 0xfe, 0x00);     
 624   5                          //RTDCodeW(OSD_Reset);            // Clear OSD
 625   5                      }
 626   4                  }
 627   3                  else
 628   3                  {
 629   4                      // OSD page is not changed
 630   4                      if (ucOSD_Page_Index)
 631   4                      {
 632   5                                              if (NOTIFY_SHOW == message)     
 633   5                                              {
 634   6                                                      RTDCodeW(OSD_Enable);
 635   6                                                      RTDSetBit(OVL_CTRL_6D, 0xfe, 0x01);
 636   6                                              }
 637   5      
 638   5                          // Change H/V Position and ADC clock may cause overflow/underflow temporarily.
 639   5                          if (NOTIFY_RIGHT_KEY == message || NOTIFY_LEFT_KEY == message)
 640   5                          {
 641   6      
 642   6                                                      RTDSetByte(STATUS0_01, 0x00);  // Clear status
 643   6                              RTDSetByte(STATUS1_1F, 0x00);  // Clear status
 644   6      
 645   6                          }
 646   5      #if (SHOW_CHECK)
                                  // Just for showing debug information
                                  OSD_Show_Check();
                                      if( ucOSD_Item_Index0 == 5 &&  ucOSD_Page_Index == 1 &&  ucOSD_Item_Index1)
                                      {
                                              ucOSD_Page_Index = 7;
                                              OSD_Show_Check();
                                              ucOSD_Page_Index = 1;
              
                                      }
              #endif
 657   5                      }
 658   4                      else
 659   4                      {
 660   5                          // We always read REG[1F] to see if frame-sync is OK.
 661   5                          // ucStatus is the OR result of REG[1F] when OSD is open, and clear to 0 when OSD is c
             -lose.
 662   5                          ucStatus    = 0;
 663   5      #if (RTDDEBUG)
                                  usPE_Sum    = 0;
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 12  

              #endif
 666   5                      }
 667   4                  }
 668   3              }
 669   2              break;
 670   2          }
 671   1      }
 672          
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 13  

ASSEMBLY LISTING OF GENERATED OBJECT CODE


             ; FUNCTION Com0068 (BEGIN)
0000         L?0105:
0000 AF00        E     MOV     R7,stGUD1+06H
0002 7D33              MOV     R5,#033H
0004 120000      E     LCALL   ?C?IMUL
0007 7800        E     MOV     R0,#LOW usOSD_Timer
0009 A606              MOV     @R0,AR6
000B 08                INC     R0
000C A607              MOV     @R0,AR7
000E 22                RET     
000F         L?0108:
000F 7800        E     MOV     R0,#LOW ucOSD_Item_Index0
0011 F6                MOV     @R0,A
0012 7800        E     MOV     R0,#LOW ucOSD_Item_Index1
0014 F6                MOV     @R0,A
0015 7800        E     MOV     R0,#LOW ucOSD_Item_Index2
0017 F6                MOV     @R0,A
0018 22                RET     
             ; FUNCTION Com0068 (END)

             ; FUNCTION GetKeyState (BEGIN)
                                           ; SOURCE LINE # 19
                                           ; SOURCE LINE # 20
                                           ; SOURCE LINE # 94
;---- Variable 'ucKeyState' assigned to Register 'R7' ----
0000 E4                CLR     A
0001 FF                MOV     R7,A
                                           ; SOURCE LINE # 96
0002 20B402            JB      bRIGHT_KEY,?C0001
                                           ; SOURCE LINE # 97
0005 7F08              MOV     R7,#08H
0007         ?C0001:
                                           ; SOURCE LINE # 98
0007 20B503            JB      bLEFT_KEY,?C0002
                                           ; SOURCE LINE # 99
000A 430760            ORL     AR7,#060H
000D         ?C0002:
                                           ; SOURCE LINE # 100
000D 900000      E     MOV     DPTR,#M512_Port60
0010 E0                MOVX    A,@DPTR
0011 20E003            JB      ACC.0,?C0003
                                           ; SOURCE LINE # 101
0014 430720            ORL     AR7,#020H
0017         ?C0003:
                                           ; SOURCE LINE # 104
0017 900000      E     MOV     DPTR,#M512_Port54
001A E0                MOVX    A,@DPTR
001B 20E003            JB      ACC.0,?C0004
                                           ; SOURCE LINE # 105
001E 430710            ORL     AR7,#010H
0021         ?C0004:
                                           ; SOURCE LINE # 106
0021 900000      E     MOV     DPTR,#M512_Port55
0024 E0                MOVX    A,@DPTR
0025 20E003            JB      ACC.0,?C0005
                                           ; SOURCE LINE # 107
0028 430701            ORL     AR7,#01H
002B         ?C0005:
                                           ; SOURCE LINE # 109
C51 COMPILER V7.06   LCD_MSG                                                               11/21/2005 13:47:29 PAGE 14  

                                           ; SOURCE LINE # 112
002B         ?C0006:
002B 22                RET     
             ; FUNCTION GetKeyState (END)

             ; FUNCTION Key_Trans (BEGIN)
                                           ; SOURCE LINE # 121
                                           ; SOURCE LINE # 122
                                           ; SOURCE LINE # 127
0000 E4                CLR     A
0001 F500        R     MOV     ucNotify,A
                                           ; SOURCE LINE # 130
0003 7800        R     MOV     R0,#LOW ucP3_Curr
0005 E6                MOV     A,@R0
0006 18                DEC     R0
0007 F6                MOV     @R0,A
                                           ; SOURCE LINE # 132
0008 120000      R     LCALL   GetKeyState

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -