C51 COMPILER V9.01   JISHU                                                                 08/26/2014 15:32:49 PAGE 1   


C51 COMPILER V9.01, COMPILATION OF MODULE JISHU
OBJECT MODULE PLACED IN jishu.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE jishu.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include <reg51.h>
   2          #define led  P1
   3          void delay(unsigned char x);   
   4          void flash( );
   5          void main( )
   6          {
   7   1         TMOD=0X60;   //定时器1工作在计数方式，采用方式2
   8   1         TL1=251;       //定时器1送定时初值
   9   1         TH1=251;
  10   1         TR1=1;         //启动定时器1
  11   1         while(1)
  12   1         {
  13   2         while(!TF1);    //判断定时器1益处否
  14   2         TF1=0;        //溢出标志位清0
  15   2         flash( );       //调用闪烁子程序
  16   2         }
  17   1      }
  18          /* 闪烁子程序 */
  19          void flash( )
  20          {  
  21   1        
  22   1        unsigned char i;  
  23   1        for(i=0;i<8;i++)   //循环8次
  24   1            {       
  25   2                 led=0x0ff;  //灯全亮
  26   2             delay(255); 
  27   2             led=0x00;  //灯全灭
  28   2             delay(255);
  29   2           }
  30   1      }
  31          /* 延时子程序 */
  32          void delay( unsigned char x )
  33          { 
  34   1         unsigned char j,k;
  35   1         for(j=0;j<x;j++)
  36   1            for(k=0;k<255;k++); 
  37   1      }


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


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