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

📄 led.lst

📁 我在spartan-3e starter kit 的板上实现了mc8051
💻 LST
字号:
C51 COMPILER V8.08   LED                                                                   04/12/2007 11:19:08 PAGE 1   


C51 COMPILER V8.08, COMPILATION OF MODULE LED
OBJECT MODULE PLACED IN led.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE led.c

line level    source

   1          /* BLINKY.C - LED Flasher for the Keil MCBx51 Evaluation Board with 80C51 device*/
   2                            
   3          #include <REG51.H>
   4          
   5          // When you have enabled the option Stop Program Execution with Serial
   6          // Interrupt, the Monitor-51 uses the serial interrupt of the UART.
   7          // It is therefore required to reserve the memory locations for the interrupt
   8          // vector.  You can do this by adding one of the following code lines:
   9          
  10          // char code reserve [3] _at_ 0x23;   // when using on-chip UART for communication
  11          // char code reserve [3] _at_  0x3;   // when using off-chip UART for communication
  12          
  13          void wait (void)  {                   /* wait function */
  14   1        ;                                   /* only to delay for LED flashes */
  15   1      }
  16          
  17          void main (void)  {
  18   1        unsigned int i;                     /* Delay var */
  19   1        unsigned char j;                    /* LED var */
  20   1      
  21   1        while (1) {                         /* Loop forever */
  22   2          for (j=0x01; j< 0x80; j<<=1)  {   /* Blink LED 0, 1, 2, 3, 4, 5, 6 */
  23   3            P1 = j;                         /* Output to LED Port */
  24   3            for (i = 0; i < 10000; i++)  {  /* Delay for 10000 Counts */
  25   4             wait ();                       /* call wait function */
  26   4            }
  27   3          }
  28   2      
  29   2          for (j=0x80; j> 0x01; j>>=1)  {   /* Blink LED 6, 5, 4, 3, 2, 1 */
  30   3            P1 = j;                         /* Output to LED Port */
  31   3            for (i = 0; i < 10000; i++)  {  /* Delay for 10000 Counts */
  32   4             wait ();                       /* call wait function */
  33   4            }
  34   3          }
  35   2        }
  36   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     67    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   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 + -