单片机C语言程序设计实训100例

源代码在线查看: 8.lst

软件大小: 12498 K
上传用户: zaindyclg
关键词: 100 单片机 C语言 程序设计
下载地址: 免注册下载 普通下载 VIP

相关代码

				C51 COMPILER V8.08   8                                                                     08/11/2009 10:58:20 PAGE 1   
				
				
				C51 COMPILER V8.08, COMPILATION OF MODULE 8
				OBJECT MODULE PLACED IN 8.OBJ
				COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 8.c BROWSE DEBUG OBJECTEXTEND
				
				line level    source
				
				   1          /***************   writer:shopping.w   ******************/
				   2          #include 
				   3          #include 
				   4          #define uint unsigned int
				   5          #define uchar unsigned char
				   6          #define PA XBYTE[0x0000] 
				   7          #define PB XBYTE[0x0001]
				   8          #define PC XBYTE[0x0002]
				   9          #define COM XBYTE[0x0003]
				  10          
				  11          uchar code DSY_CODE_Queue[]=
				  12          {
				  13                  0xff,0xff,0xff,0xff,0xff,0xff,0xff,
				  14                  0xa4,0xc0,0xc0,0x80,0xc0,0x80,0xf9,0x80,
				  15                  0xff,0xff,0xff,0xff,0xff,0xff,0xff
				  16          };
				  17          
				  18          uchar code DSY_Index[]=
				  19          {
				  20                  0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
				  21          };
				  22          
				  23          void Delay(uint x)
				  24          {
				  25   1              uchar i;
				  26   1              while(x--)
				  27   1              {
				  28   2                      for(i=0;i				  29   2              }
				  30   1      }
				  31          
				  32          void main()
				  33          {
				  34   1              uchar i,j,k;
				  35   1              COM = 0x80;
				  36   1              while(1)
				  37   1              {
				  38   2                      for(j=0;j				  39   2                      {
				  40   3                              for(k=0;k				  41   3                              {
				  42   4                                      PB = DSY_Index[k];
				  43   4                                      PA = DSY_CODE_Queue[k+i];
				  44   4                                      Delay(1);
				  45   4                              }
				  46   3                      }
				  47   2                      i = (i+1)%15;
				  48   2              }
				  49   1      }
				
				
				MODULE INFORMATION:   STATIC OVERLAYABLE
				   CODE SIZE        =     86    ----
				   CONSTANT SIZE    =     30    ----
				   XDATA SIZE       =   ----    ----
				C51 COMPILER V8.08   8                                                                     08/11/2009 10:58:20 PAGE 2   
				
				   PDATA SIZE       =   ----    ----
				   DATA SIZE        =   ----       1
				   IDATA SIZE       =   ----    ----
				   BIT SIZE         =   ----    ----
				END OF MODULE INFORMATION.
				
				
				C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
							

相关资源