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

📄 main.lst

📁 8051单片机C语言设计完全手册
💻 LST
字号:
C51 COMPILER V6.02  MAIN                                                                   09/23/2002 00:38:21 PAGE 1   


C51 COMPILER V6.02, 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          void main (void) {
  15   1      	void change(int *pt1,int *pt2); /*函数声明*/
  16   1      	int *p1,*p2,a,b,*t;
  17   1      
  18   1      /*------------------------------------------------
  19   1      Setup the serial port for 1200 baud at 16MHz.
  20   1      ------------------------------------------------*/
  21   1      #ifndef MONITOR51
  22   1          SCON  = 0x50;		        /* SCON: mode 1, 8-bit UART, enable rcvr      */
  23   1          TMOD |= 0x20;               /* TMOD: timer 1, mode 2, 8-bit reload        */
  24   1          TH1   = 221;                /* TH1:  reload value for 1200 baud @ 16MHz   */
  25   1          TR1   = 1;                  /* TR1:  timer 1 run                          */
  26   1          TI    = 1;                  /* TI:   set TI to send first char of UART    */
  27   1      #endif
  28   1      /*------------------------------------------------
  29   1      Note that an embedded program never exits (because
  30   1      there is no operating system to return to).  It
  31   1      must loop and execute forever.
  32   1      ------------------------------------------------*/
  33   1      scanf("%d ,%d" ,&a, &b);
  34   1      p1 =&a;
  35   1      p2 =&b;
  36   1      change(p1, p2); /*子程序调用*/
  37   1      printf("%d ,%d \n",*p1,*p2);
  38   1      
  39   1          while (1) {};
  40   1      }
*** WARNING C280 IN LINE 16 OF .\MAIN.C: 't': unreferenced local variable
  41          
  42          void change(int *pt1,int *pt2)
  43          { /*子程序实现将两数值调整为由大到小*/
  44   1      int t;
  45   1      if (*pt1<*pt2) /*交换内存变量的值*/
  46   1      {
  47   2      t=*pt1; *pt1=*pt2; *pt2=t; }
  48   1      return ;
  49   1      }
  50          
  51          
  52          


C51 COMPILER V6.02  MAIN                                                                   09/23/2002 00:38:21 PAGE 2   

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


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

⌨️ 快捷键说明

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