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

📄 system.lst

📁 MS2 程序分析 Lldwsw 一:下载MS2.RAR 压缩包解压缩后可以看到如下界面: 第一项为MS2 软件包
💻 LST
📖 第 1 页 / 共 2 页
字号:
 171   1              while(wVal--)
 172   1              {
 173   2              #ifdef SPEEDUP
 174   2      
 175   2                      _nop_();
 176   2                      _nop_();
 177   2                      _nop_();
 178   2              #else
C51 COMPILER V7.10   SYSTEM                                                                03/20/2007 22:53:09 PAGE 4   

                              _nop_();
                      #endif
 181   2              }
 182   1      }
 183          
 184          
 185          /******************************************************************************
 186          * Function Name : msg_queue_in
 187          * Parameter             : msgType, msgPoint
 188          * Return Value  : void
 189          * Description           : General purpose  function for message in
 190          * Created               : 2005.6.1 by wangsw
 191          * Modified              : -
 192          ******************************************************************************/
 193          void msg_queue_in(MSGTYPE msgType, MSGPOINT msgPoint)   
 194          {
 195   1              if(MsgPoolPoint == MSG_STACK_DEPTH)                                             
 196   1              {
 197   2                      ERRprintf("msg_queue_in\n");
 198   2                      return;
 199   2              }
 200   1              bEA = EA;                       
 201   1              EA = 0;                 
 202   1              MsgPool[MsgPoolPoint][0] = msgType;
 203   1              MsgPool[MsgPoolPoint++][1] = msgPoint;
 204   1              EA = bEA;
 205   1      }
 206          
 207          
 208          
 209          
 210          
 211          
 212          
 213          
 214          #ifdef MSG_FIFO                                 
              /******************************************************************************
              * Function Name : msg_queue_out
              * Parameter             : none
              * Return Value  : byte
              * Description           : General purpose  function for message out, It support FIFO
              * Created               : 2005.6.1 by wangsw
              * Modified              : -
              ******************************************************************************/
              byte msg_queue_out(void)
              {
                      if(MsgPoolPoint == 0)
                      {
                              return(MSG_NULL);
                      }
                      bEA = EA;
                      EA = 0;                                 
                      g_MsgReturnValue = MsgPool[0][1];                               
                      msgType = MsgPool[0][0];
                      if(--MsgPoolPoint)                      
                      {
                              for(i = 0; i < MsgPoolPoint; i++)
                              {
                                      MsgPool[i][0] = MsgPool[i + 1][0];
                                      MsgPool[i][1] = MsgPool[i + 1][1];
                              }
                      }
C51 COMPILER V7.10   SYSTEM                                                                03/20/2007 22:53:09 PAGE 5   

                      EA = bEA;
                      return(msgType);
              }
              #endif  
 245          
 246          
 247          #ifdef MSG_FILO
              /******************************************************************************
              * Function Name : msg_queue_out
              * Parameter             : none
              * Return Value  : byte
              * Description           : General purpose  function for message out, It support FILO
              * Created               : 2005.6.1 by wangsw
              * Modified              : -
              ******************************************************************************/
              byte msg_queue_out(void)
              {
                      if(MsgPoolPoint == 0)
                      {
                              return(MSG_NULL);
                      }
                      bEA = EA;
                      EA = 0;
                      g_MsgReturnValue = MsgPool[--MsgPoolPoint][1];
                      msgType = MsgPool[MsgPoolPoint][0];
                      EA = bEA;
                      return(msgType);
              }                                                                                                       
              #endif 
 270          
 271          
 272          #ifdef MSG_PRIORITY
 273          /******************************************************************************
 274          * Function Name : msg_queue_out
 275          * Parameter             : none
 276          * Return Value  : byte
 277          * Description           : General purpose  function for message out, It support PRIORITY.
 278          *                                 The High 4bit of the message type is Priority, 
 279          *                                 The LOW 4bit of the message type is real message type
 280          *                                 For example:MSG_KEY = 0x01,The priority = 0,the type = 1
 281          *                                 D7,  D6,  D5,  D4,  D3,  D2,  D1,  D0
 282          *                                 |message priority     || message type  |
 283          *
 284          * Created               : 2005.6.1 by wangsw
 285          * Modified              : -
 286          ******************************************************************************/
 287          byte msg_queue_out(void)
 288          {
 289   1              if(MsgPoolPoint == 0)
 290   1              {
 291   2                      return(MSG_NULL);
 292   2              }
 293   1              bEA = EA;
 294   1              EA = 0;
 295   1              if(MsgPoolPoint == 1)
 296   1              {
 297   2                      g_MsgReturnValue = MsgPool[--MsgPoolPoint][1];
 298   2                      msgType = MsgPool[MsgPoolPoint][0];
 299   2                      EA = bEA;
 300   2                      return(msgType);
 301   2              }       
 302   1              
C51 COMPILER V7.10   SYSTEM                                                                03/20/2007 22:53:09 PAGE 6   

 303   1              msgType =MsgPool[0][0];
 304   1              g_MsgReturnValue = 0;
 305   1              for(i = 1; i < MsgPoolPoint; i++)
 306   1              {
 307   2                      if((msgType & 0xF0) < (MsgPool[i][0] & 0xF0))
 308   2                      {
 309   3                              msgType = MsgPool[i][0];
 310   3                              g_MsgReturnValue = i;
 311   3                      }
 312   2              }
 313   1              i = g_MsgReturnValue;
 314   1              g_MsgReturnValue = MsgPool[i][1];
 315   1              MsgPoolPoint--;
 316   1              for(; i < MsgPoolPoint; i++)
 317   1              {
 318   2                      MsgPool[i][0] = MsgPool[i + 1][0]; 
 319   2                      MsgPool[i][1] = MsgPool[i + 1][1]; 
 320   2              }
 321   1      
 322   1              EA = bEA;
 323   1              return(msgType);        
 324   1      }
 325          #endif
 326          
 327          #ifdef MSG_POINT
              
              #endif
 330          
 331          
 332          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    523    ----
   CONSTANT SIZE    =     72    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     13       2
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      1    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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