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

📄 serial.lst

📁 一个通过8051来控制8019上网的程序 该程序已经通过并成功用于键盘
💻 LST
字号:
C51 COMPILER V7.06   SERIAL                                                                03/01/2004 09:03:33 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE SERIAL
OBJECT MODULE PLACED IN SERIAL.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE SERIAL.C LARGE BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          //-----------------------------------------------------------------------------
   2          // Net SERIAL.C
   3          //
   4          // This module handles RS-232 messages and associated tasks
   5          //-----------------------------------------------------------------------------
   6          #include <reg52.h>
   7          #include <intrins.h>
   8          #include "net.h"
   9          #include "serial.h"
  10          
  11          
  12          void init_serial(void)
  13          {
  14   1      //      ClearCommRecBuffer();
  15   1      //      OpenComm();
  16   1      }
  17          
  18          //------------------------------------------------------------------------
  19          // This function converts an integer to an ASCII string.  It is a 
  20          // normally provided as a standard library function but the Keil
  21          // libraries do not include it.  Caution: The string passed to this
  22          // must be at least 12 bytes long
  23          //------------------------------------------------------------------------
  24          char * itoa(UINT value, char * buf, UCHAR radix)
  25          {
  26   1              UINT i;
  27   1              char * ptr;
  28   1              char * temphold;
  29   1      
  30   1              temphold = buf;
  31   1              ptr = buf + 12;
  32   1              *--ptr = 0;             // Insert NULL char
  33   1              do
  34   1              {
  35   2                 // First create string in reverse order
  36   2                 i = (value % radix) + 0x30;
  37   2                      if(i > 0x39) i += 7;
  38   2                      *--ptr = i;
  39   2            value = value / radix;
  40   2              } while(value != 0);
  41   1      
  42   1              // Next, move the string 6 places to the left
  43   1              // Include NULL character
  44   1              for( ; (*buf++ = *ptr++); );    
  45   1              return(temphold);
  46   1      }
  47          
  48          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    233    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----      14
   PDATA SIZE       =   ----    ----
C51 COMPILER V7.06   SERIAL                                                                03/01/2004 09:03:33 PAGE 2   

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