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

📄 ysd.lst

📁 报警控制程序
💻 LST
字号:
C51 COMPILER V7.06   YSD                                                                   05/14/2008 11:43:43 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE YSD
OBJECT MODULE PLACED IN ysd.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ysd.c BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include " reg52.h"
   2          #include "main.h"
   3          #include "intrins.h"
   4          //#include "string.h"
   5          
   6          //unsigned char data dvr_set;                           //cumputer set or cancel alarm
   7          extern bit flag_ea;
   8          extern unsigned char data Cummun;
   9          extern unsigned char data R_count;
  10          extern unsigned char data data2;
  11          extern unsigned char data data1;
  12          extern unsigned char data P0_sbuf;
  13          extern unsigned char data wdt_count;
  14          
  15          
  16          
  17          
  18          //unsigned char code My_Array1[6]={0x4a,0x44,0x41,0x43,0x46,0x4b};
  19          extern void delay1ms(unsigned char  count);
  20          extern void send_char_com(unsigned char ch);
  21          extern void slave(void);
  22          extern void master2_in(void);
  23          //extern void com_isr(void);
  24          /*------------------------------------------------------------------
  25                          send the data sbuf
  26            ------------------------------------------------------------------*/
  27          //void send_char_com (unsigned char ch)
  28          //{ 
  29            //    SBUF=ch;
  30          //      while(TI==0);
  31          //      TI=0;
  32          //} 
  33          /*-------------------------------------------------------------------------
  34                   shortdelay
  35            -------------------------------------------------------------------------*/
  36          void shortdelay(unsigned char count)
  37          {
  38   1         
  39   1         unsigned int i;
  40   1         unsigned int j;
  41   1        for(i=0;i<count;i++)
  42   1          for(j=0;j<=140;j++)
  43   1               {   
  44   2                  if(wdt_count<15)
  45   2            {
  46   3            WDTRST=0x1E;                               
  47   3            WDTRST=0xE1;
  48   3            }
  49   2              _nop_();
  50   2               }
  51   1      }
  52          /* -----------------------------------------------------------------
  53                       deal with the dvr inquire command
  54             -----------------------------------------------------------------*/
  55           void alarm2_in (void)
C51 COMPILER V7.06   YSD                                                                   05/14/2008 11:43:43 PAGE 2   

  56          {
  57   1       unsigned int i=0;
  58   1       unsigned char tbuf[8];
  59   1       RT_CON=1;
  60   1      
  61   1      
  62   1       shortdelay(1);
  63   1       
  64   1       tbuf[0]=0x2a;
  65   1       tbuf[1]=0x06;
  66   1       tbuf[2]=0x01;
  67   1       tbuf[3]=0x00;
  68   1       tbuf[4]=0xb0;// & dvr_set); 
  69   1       tbuf[5]=~P0;
  70   1       tbuf[6]=0x00;
  71   1       tbuf[7]=tbuf[0]+tbuf[1]+tbuf[2]+tbuf[3]+tbuf[4]+tbuf[5]+tbuf[6];
  72   1       
  73   1         
  74   1              do
  75   1              {
  76   2            
  77   2                
  78   2                      send_char_com(tbuf[i]);
  79   2              shortdelay(1);
  80   2                      i++;
  81   2              } while( i<8 );
  82   1       RT_CON=0;
  83   1       } 
  84           
  85          
  86          
  87            
  88          
  89          
  90          extern void ysd(unsigned char rbuf1[8])
  91          {
  92   1             unsigned char data s;
  93   1                 s=rbuf1[1];
  94   1                 switch(s)
  95   1                        {
  96   2                         case 0x04:if(Cummun==0x00)
  97   2                           alarm2_in();
  98   2      
  99   2                           if(Cummun==0x01)
 100   2                                           master2_in();
 101   2      
 102   2                                      
 103   2      
 104   2                        
 105   2                                       break;
 106   2                         case 0x06:if(Cummun==0x00)
 107   2                                   P2=~rbuf1[5];
 108   2                                               if(Cummun==0x01)
 109   2                                               {
 110   3                                               if(rbuf1[4]==0xb0)
 111   3                           data2=rbuf1[6];
 112   3                                               else
 113   3                                               P2=~rbuf1[5];
 114   3                                               }
 115   2                           if(Cummun==0x02)
 116   2                                               {
 117   3                                               if(rbuf1[4]==0xb0)
C51 COMPILER V7.06   YSD                                                                   05/14/2008 11:43:43 PAGE 3   

 118   3                           data1=rbuf1[5];
 119   3                                               else
 120   3                                               P2=~rbuf1[6];
 121   3                                               }
 122   2                                               
 123   2                                               break;
 124   2                                               
 125   2                        }
 126   1                       
 127   1                flag_ea=1;
 128   1               
 129   1      }
 130              


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    274    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      13
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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