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

📄 main.lst

📁 《8051系列单片机C程序设计完全手册》的光盘中的所有源代码
💻 LST
字号:
C51 COMPILER V6.23a  MAIN                                                                  11/14/2002 00:22:18 PAGE 1   


C51 COMPILER V6.23a, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE main.c LARGE DEBUG OBJECTEXTEND

stmt level    source

   1          #include <REG52.H>                /* special function register declarations   */
   2                                            /* for the intended 8051 derivative         */
   3          
   4          #include <stdio.h>                /* prototype declarations for I/O functions */
   5          
   6          #ifdef MONITOR51                         /* Debugging with Monitor-51 needs   */
              char code reserve [3] _at_ 0x23;         /* space for serial interrupt if     */
              #endif                                   /* Stop Exection with Serial Intr.   */
   9                                                   /* is enabled                        */
  10          /*------------------------------------------------
  11          The main C function.  Program execution starts
  12          here after stack initialization.
  13          ------------------------------------------------*/
  14          union data1
  15          {
  16                  int a;
  17                  float b;
  18                  double c;
  19                  char d;
  20          }mm ;
  21          void main (void) {
  22   1      
  23   1      /*------------------------------------------------
  24   1      Setup the serial port for 1200 baud at 16MHz.
  25   1      ------------------------------------------------*/
  26   1      #ifndef MONITOR51
  27   1          SCON  = 0x50;                       /* SCON: mode 1, 8-bit UART, enable rcvr      */
  28   1          TMOD |= 0x20;               /* TMOD: timer 1, mode 2, 8-bit reload        */
  29   1          TH1   = 221;                /* TH1:  reload value for 1200 baud @ 16MHz   */
  30   1          TR1   = 1;                  /* TR1:  timer 1 run                          */
  31   1          TI    = 1;                  /* TI:   set TI to send first char of UART    */
  32   1      #endif
  33   1      /*------------------------------------------------
  34   1      Note that an embedded program never exits (because
  35   1      there is no operating system to return to).  It
  36   1      must loop and execute forever.
  37   1      ------------------------------------------------*/
  38   1              mm.a=6;
  39   1              printf("%d\n",mm.a);
  40   1              mm.c=67.2;
  41   1              printf(" %5.1 lf\n ",mm .c);
  42   1              mm.d='W';
  43   1              mm.b=34.2;
  44   1              printf( "%5.1f,%c\n" ,mm.b,mm.d);
  45   1          while (1) {};
  46   1      }
  47          
  48          
  49          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    137    ----
   CONSTANT SIZE    =     25    ----
   XDATA SIZE       =      4    ----
C51 COMPILER V6.23a  MAIN                                                                  11/14/2002 00:22:18 PAGE 2   

   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 + -