📄 main.lst
字号:
C51 COMPILER V7.06 MAIN 07/10/2003 14:34:43 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE main.c DEBUG OBJECTEXTEND CODE LISTINCLUDE SYMBOLS
stmt level source
1 /*********************************************************************
2 * Copright(c) 2003,广州周立功单片机发展有限公司
3 * All rights reserved.
4 *
5 *文件名称: main.c
6 *文件标识:
7 *摘 要: 主程序, 串口工作在中断方式的接收和发送,可通过串口显示相关信息以及输入信息
8 *
9 *当前版本: V1.0
10 *完成日期: 2003.2.28
11 *
12 *
13 *********************************************************************/
14
15 /**********************************************************************************************/
16
17 #include "net_cfg.h"
1 =1 #include "my66x.h" //头文件定义,包含很多用到的宏的定义
1 =2 #include <stdio.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 STDIO.H
3 =3
4 =3 Prototypes for standard I/O functions.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __STDIO_H__
10 =3 #define __STDIO_H__
11 =3
12 =3 #ifndef EOF
13 =3 #define EOF -1
14 =3 #endif
15 =3
16 =3 #ifndef NULL
17 =3 #define NULL ((void *) 0)
18 =3 #endif
19 =3
20 =3 #ifndef _SIZE_T
21 =3 #define _SIZE_T
22 =3 typedef unsigned int size_t;
23 =3 #endif
24 =3
25 =3 #pragma SAVE
26 =3 #pragma REGPARMS
27 =3 extern char _getkey (void);
28 =3 extern char getchar (void);
29 =3 extern char ungetchar (char);
30 =3 extern char putchar (char);
31 =3 extern int printf (const char *, ...);
32 =3 extern int sprintf (char *, const char *, ...);
33 =3 extern int vprintf (const char *, char *);
34 =3 extern int vsprintf (char *, const char *, char *);
35 =3 extern char *gets (char *, int n);
36 =3 extern int scanf (const char *, ...);
C51 COMPILER V7.06 MAIN 07/10/2003 14:34:43 PAGE 2
37 =3 extern int sscanf (char *, const char *, ...);
38 =3 extern int puts (const char *);
39 =3
40 =3 #pragma RESTORE
41 =3
42 =3 #endif
43 =3
2 =2 #include <ctype.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 CTYPE.H
3 =3
4 =3 Prototypes for character functions.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __CTYPE_H__
10 =3 #define __CTYPE_H__
11 =3
12 =3 #pragma SAVE
13 =3 #pragma REGPARMS
14 =3 extern bit isalpha (unsigned char);
15 =3 extern bit isalnum (unsigned char);
16 =3 extern bit iscntrl (unsigned char);
17 =3 extern bit isdigit (unsigned char);
18 =3 extern bit isgraph (unsigned char);
19 =3 extern bit isprint (unsigned char);
20 =3 extern bit ispunct (unsigned char);
21 =3 extern bit islower (unsigned char);
22 =3 extern bit isupper (unsigned char);
23 =3 extern bit isspace (unsigned char);
24 =3 extern bit isxdigit (unsigned char);
25 =3 extern unsigned char tolower (unsigned char);
26 =3 extern unsigned char toupper (unsigned char);
27 =3 extern unsigned char toint (unsigned char);
28 =3
29 =3 #define _tolower(c) ( (c)-'A'+'a' )
30 =3 #define _toupper(c) ( (c)-'a'+'A' )
31 =3 #define toascii(c) ( (c) & 0x7F )
32 =3 #pragma RESTORE
33 =3
34 =3 #endif
3 =2 #include <absacc.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 ABSACC.H
3 =3
4 =3 Direct access to 8051, extended 8051 and Philips 80C51MX memory areas.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __ABSACC_H__
10 =3 #define __ABSACC_H__
11 =3
12 =3 #define CBYTE ((unsigned char volatile code *) 0)
13 =3 #define DBYTE ((unsigned char volatile data *) 0)
14 =3 #define PBYTE ((unsigned char volatile pdata *) 0)
15 =3 #define XBYTE ((unsigned char volatile xdata *) 0)
16 =3
17 =3 #define CWORD ((unsigned int volatile code *) 0)
18 =3 #define DWORD ((unsigned int volatile data *) 0)
19 =3 #define PWORD ((unsigned int volatile pdata *) 0)
C51 COMPILER V7.06 MAIN 07/10/2003 14:34:43 PAGE 3
20 =3 #define XWORD ((unsigned int volatile xdata *) 0)
21 =3
22 =3
23 =3 #ifdef __CX51__
=3 #define FVAR(object, addr) (*((object volatile far *) (addr)))
=3 #define FARRAY(object, base) ((object volatile far *) (base))
=3 #define FCVAR(object, addr) (*((object const far *) (addr)))
=3 #define FCARRAY(object, base) ((object const far *) (base))
=3 #else
29 =3 #define FVAR(object, addr) (*((object volatile far *) ((addr)+0x10000L)))
30 =3 #define FCVAR(object, addr) (*((object const far *) ((addr)+0x810000L)))
31 =3 #define FARRAY(object, base) ((object volatile far *) ((base)+0x10000L))
32 =3 #define FCARRAY(object, base) ((object const far *) ((base)+0x810000L))
33 =3 #endif
34 =3
35 =3 #endif
4 =2 #include <intrins.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 INTRINS.H
3 =3
4 =3 Intrinsic functions for C51.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __INTRINS_H__
10 =3 #define __INTRINS_H__
11 =3
12 =3 extern void _nop_ (void);
13 =3 extern bit _testbit_ (bit);
14 =3 extern unsigned char _cror_ (unsigned char, unsigned char);
15 =3 extern unsigned int _iror_ (unsigned int, unsigned char);
16 =3 extern unsigned long _lror_ (unsigned long, unsigned char);
17 =3 extern unsigned char _crol_ (unsigned char, unsigned char);
18 =3 extern unsigned int _irol_ (unsigned int, unsigned char);
19 =3 extern unsigned long _lrol_ (unsigned long, unsigned char);
20 =3 extern unsigned char _chkfloat_(float);
21 =3
22 =3 #endif
23 =3
5 =2 #include <math.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 MATH.H
3 =3
4 =3 Prototypes for mathematic functions.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __MATH_H__
10 =3 #define __MATH_H__
11 =3
12 =3 #pragma SAVE
13 =3 #pragma REGPARMS
14 =3 extern char cabs (char val);
15 =3 extern int abs (int val);
16 =3 extern long labs (long val);
17 =3 extern float fabs (float val);
18 =3 extern float sqrt (float val);
19 =3 extern float exp (float val);
20 =3 extern float log (float val);
21 =3 extern float log10 (float val);
C51 COMPILER V7.06 MAIN 07/10/2003 14:34:43 PAGE 4
22 =3 extern float sin (float val);
23 =3 extern float cos (float val);
24 =3 extern float tan (float val);
25 =3 extern float asin (float val);
26 =3 extern float acos (float val);
27 =3 extern float atan (float val);
28 =3 extern float sinh (float val);
29 =3 extern float cosh (float val);
30 =3 extern float tanh (float val);
31 =3 extern float atan2 (float y, float x);
32 =3
33 =3 extern float ceil (float val);
34 =3 extern float floor (float val);
35 =3 extern float modf (float val, float *n);
36 =3 extern float fmod (float x, float y);
37 =3 extern float pow (float x, float y);
38 =3
39 =3 #pragma RESTORE
40 =3
41 =3 #endif
6 =2 #include <setjmp.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 SETJMP.H
3 =3
4 =3 Prototypes for longjmp facility.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 /* define the buffer type for holding the state information */
10 =3 #ifndef __SETJMP_H__
11 =3 #define __SETJMP_H__
12 =3
13 =3 #ifdef __CX51__
=3 #define _JBLEN 9 /* SP, SPE, ?C_XBP, ?C_IBP, ?C_PBP, RET-ADDR */
=3 #else
16 =3 #define _JBLEN 7 /* RET-ADDR, ?C_XBP, ?C_IBP, ?C_PBP, SP */
17 =3 #endif
18 =3
19 =3 typedef char jmp_buf[_JBLEN];
20 =3
21 =3 /* function prototypes */
22 =3 extern int setjmp (jmp_buf);
23 =3 extern void longjmp (jmp_buf, int);
24 =3 #endif
25 =3
7 =2 #include <stdarg.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 STDARG.H
3 =3
4 =3 Prototypes for variable argument lists.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
9 =3 #ifndef __STDARG_H__
10 =3 #define __STDARG_H__
11 =3
12 =3 #ifndef NULL
=3 #define NULL ((void *) 0)
=3 #endif
15 =3
C51 COMPILER V7.06 MAIN 07/10/2003 14:34:43 PAGE 5
16 =3 #ifndef _VA_LIST_DEFINED
17 =3 typedef char *va_list;
18 =3 #define _VA_LIST_DEFINED
19 =3 #endif
20 =3
21 =3 #define va_start(ap,v) ap = (va_list)&v + sizeof(v)
22 =3 #define va_arg(ap,t) (((t *)ap)++[0])
23 =3 #define va_end(ap)
24 =3
25 =3 #endif
8 =2 #include <stdlib.h>
1 =3 /*--------------------------------------------------------------------------
2 =3 STDLIB.H
3 =3
4 =3 Standard functions.
5 =3 Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 =3 All rights reserved.
7 =3 --------------------------------------------------------------------------*/
8 =3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -