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

📄 pec.lst

📁 英飞凌XC164CS系列单片机的源码
💻 LST
字号:
C166 COMPILER V4.22c, PEC                                                                  07/02/2002 16:41:27 PAGE 1   


C166 COMPILER V4.22c, COMPILATION OF MODULE PEC
OBJECT MODULE PLACED IN pec.OBJ
COMPILER INVOKED BY: C:\Keil\C166\BIN\C166.EXE pec.c BROWSE MOD167 DEBUG

 stmt lvl     source

    1         /*--------------------------------------------------------- 
    2         PECDEF reserves space for PEC channel 0 pointers.  Note
    3         that this must be the first line of the program.
    4         ---------------------------------------------------------*/
    5         #pragma PECDEF (0)
    6         
    7         #include <reg167.h>
    8         #include <intrins.h>
    9         #include <stdio.h>
   10         #include <string.h>
   11         
   12         const char string1 [] = "0123456789\n";
   13         
   14         /*--------------------------------------------------------- 
   15         This function initializes PEC Channel 0 to move the data 
   16         from STRING1 to the serial transmit buffer. 
   17         ---------------------------------------------------------*/
   18         void serial_PEC0_setup (void)
   19         {
   20  1      PECC0 = 0x0500 | strlen (string1);     // Move Bytes, Inc Src Ptr
   21  1      SRCP0 = _sof_ (string1);               // Source is STRING1
   22  1      DSTP0 = (unsigned int) &S0TBUF;        // Destination is the serial output
   23  1      }
   24         
   25         /*--------------------------------------------------------- 
   26         The Serial TX interrupt just resets PEC 0 and transfers 
   27         another copy of STRING 1.
   28         ---------------------------------------------------------*/
   29         void serial_TX_irq (void) interrupt S0TINT = 42
   30         {
   31  1      serial_PEC0_setup ();
   32  1      }
   33         
   34         /*--------------------------------------------------------- 
   35         The setup routine for the serial port initializes the
   36         PEC 0 transfer and sets a TX interrupt request.
   37         ---------------------------------------------------------*/
   38         void serial_setup (unsigned int baud)
   39         {
   40  1                                         // Setup the Baudrate
   41  1      S0BG = (20000000UL / (32UL * (unsigned long) baud)) -1;
   42  1      
   43  1      P3 |= 0x0400;                      // Set TXD high
   44  1      DP3 |= 0x0400;                     // Set TXD for output
   45  1      DP3 &= ~0x0800;                    // Set RXD for input
   46  1      
   47  1      S0CON = 0x8011;
   48  1      S0TIC = 0x00F8;                    // Serial TX IRQ = Level 14, Priority 0 (PEC 0)
   49  1      
   50  1      serial_PEC0_setup ();
   51  1      IEN = 1;                           // Enable interrupts
   52  1      }
   53         
   54         /*--------------------------------------------------------- 
   55         Main C Function
C166 COMPILER V4.22c, PEC                                                                  07/02/2002 16:41:27 PAGE 2   

   56         ---------------------------------------------------------*/
   57         void main (void)
   58         {
   59  1      serial_setup (19200);
   60  1      
   61  1      while (1) 
   62  1        {
   63  2        }
   64  1      }
   65         
   66         /*--------------------------------------------------------- 
   67         ---------------------------------------------------------*/
   68         


MODULE INFORMATION:   INITIALIZED  UNINITIALIZED
  CODE SIZE        =         126     --------
  NEAR-CONST SIZE  =          12     --------
  FAR-CONST SIZE   =    --------     --------
  HUGE-CONST SIZE  =    --------     --------
  XHUGE-CONST SIZE =    --------     --------
  NEAR-DATA SIZE   =    --------     --------
  FAR-DATA SIZE    =    --------     --------
  XHUGE-DATA SIZE  =    --------     --------
  IDATA-DATA SIZE  =    --------     --------
  SDATA-DATA SIZE  =    --------     --------
  BDATA-DATA SIZE  =    --------     --------
  HUGE-DATA SIZE   =    --------     --------
  BIT SIZE         =    --------     --------
  INIT'L SIZE      =    --------     --------
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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