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

📄 fatinit.lst

📁 C51实现的FAT32文件系统
💻 LST
📖 第 1 页 / 共 4 页
字号:
C51 COMPILER V6.23a  FATINIT                                                               12/24/2004 00:11:37 PAGE 1   


C51 COMPILER V6.23a, COMPILATION OF MODULE FATINIT
OBJECT MODULE PLACED IN ..\Lib\FATInit.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE FATInit.c LARGE DEBUG OBJECTEXTEND CODE LISTINCLUDE SYMBOLS OBJECT(..\Lib\F
                    -ATInit.obj) 

stmt level    source

   1          #ifndef _FAT_DEFINE
   2           #include "FAT.c"
   1      =1  #define _LIBRARY_DEFINE
   2      =1  
   3      =1  #include <stdio.h>
   1      =2  /*--------------------------------------------------------------------------
   2      =2  STDIO.H
   3      =2  
   4      =2  Prototypes for standard I/O functions.
   5      =2  Copyright (c) 1988-2001 Keil Elektronik GmbH and Keil Software, Inc.
   6      =2  All rights reserved.
   7      =2  --------------------------------------------------------------------------*/
   8      =2  
   9      =2  #ifndef EOF
  10      =2   #define EOF -1
  11      =2  #endif
  12      =2  
  13      =2  #ifndef NULL
  14      =2   #define NULL ((void *) 0)
  15      =2  #endif
  16      =2  
  17      =2  #ifndef _SIZE_T
  18      =2   #define _SIZE_T
  19      =2   typedef unsigned int size_t;
  20      =2  #endif
  21      =2  
  22      =2  #pragma SAVE
  23      =2  #pragma REGPARMS
  24      =2  extern char _getkey (void);
  25      =2  extern char getchar (void);
  26      =2  extern char ungetchar (char);
  27      =2  extern char putchar (char);
  28      =2  extern int printf   (const char *, ...);
  29      =2  extern int sprintf  (char *, const char *, ...);
  30      =2  extern int vprintf  (const char *, char *);
  31      =2  extern int vsprintf (char *, const char *, char *);
  32      =2  extern char *gets (char *, int n);
  33      =2  extern int scanf (const char *, ...);
  34      =2  extern int sscanf (char *, const char *, ...);
  35      =2  extern int puts (const char *);
  36      =2  
  37      =2  #pragma RESTORE
   4      =1  #include <string.h>
   1      =2  /*--------------------------------------------------------------------------
   2      =2  STRING.H
   3      =2  
   4      =2  String functions.
   5      =2  Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
   6      =2  All rights reserved.
   7      =2  --------------------------------------------------------------------------*/
   8      =2  
   9      =2  #ifndef _SIZE_T
           =2  #define _SIZE_T
           =2  typedef unsigned int size_t;
C51 COMPILER V6.23a  FATINIT                                                               12/24/2004 00:11:37 PAGE 2   

           =2 #endif
  13      =2  
  14      =2  #ifndef NULL
           =2  #define NULL ((void *) 0L)
           =2 #endif
  17      =2  
  18      =2  #pragma SAVE
  19      =2  #pragma REGPARMS
  20      =2  extern char *strcat (char *s1, char *s2);
  21      =2  extern char *strncat (char *s1, char *s2, int n);
  22      =2  
  23      =2  extern char strcmp (char *s1, char *s2);
  24      =2  extern char strncmp (char *s1, char *s2, int n);
  25      =2  
  26      =2  extern char *strcpy (char *s1, char *s2);
  27      =2  extern char *strncpy (char *s1, char *s2, int n);
  28      =2  
  29      =2  extern int strlen (char *);
  30      =2  
  31      =2  extern char *strchr (const char *s, char c);
  32      =2  extern int strpos (const char *s, char c);
  33      =2  extern char *strrchr (const char *s, char c);
  34      =2  extern int strrpos (const char *s, char c);
  35      =2  
  36      =2  extern int strspn (char *s, char *set);
  37      =2  extern int strcspn (char *s, char *set);
  38      =2  extern char *strpbrk (char *s, char *set);
  39      =2  extern char *strrpbrk (char *s, char *set);
  40      =2  extern char *strstr  (char *s, char *sub);
  41      =2  extern char *strtok  (char *str, const char *set);
  42      =2  
  43      =2  extern char memcmp (void *s1, void *s2, int n);
  44      =2  extern void *memcpy (void *s1, void *s2, int n);
  45      =2  extern void *memchr (void *s, char val, int n);
  46      =2  extern void *memccpy (void *s1, void *s2, char val, int n);
  47      =2  extern void *memmove (void *s1, void *s2, int n);
  48      =2  extern void *memset  (void *s, char val, int n);
  49      =2  #pragma RESTORE
   5      =1  #include <stdlib.h>
   1      =2  /*--------------------------------------------------------------------------
   2      =2  STDLIB.H
   3      =2  
   4      =2  Standard functions.
   5      =2  Copyright (c) 1988-2001 Keil Elektronik GmbH and Keil Software, Inc.
   6      =2  All rights reserved.
   7      =2  --------------------------------------------------------------------------*/
   8      =2  
   9      =2  #ifndef _SIZE_T
           =2  #define _SIZE_T
           =2  typedef unsigned int size_t;
           =2 #endif
  13      =2  
  14      =2  #ifndef NULL
           =2  #define NULL ((void *) 0L)
           =2 #endif
  17      =2  
  18      =2  #ifndef _WCHAR_T_DEFINED_
  19      =2  #define _WCHAR_T_DEFINED_
  20      =2  typedef char wchar_t;
  21      =2  #endif
  22      =2  
  23      =2  
C51 COMPILER V6.23a  FATINIT                                                               12/24/2004 00:11:37 PAGE 3   

  24      =2  #pragma SAVE
  25      =2  #pragma REGPARMS
  26      =2  
  27      =2  extern int    abs  (int   val);
  28      =2  extern long  labs  (long  val);
  29      =2  
  30      =2  extern float atof (char *s1);
  31      =2  extern long  atol (char *s1);
  32      =2  extern int   atoi (char *s1);
  33      =2  extern int   rand ();
  34      =2  extern void  srand (int);
  35      =2  
  36      =2  extern float         strtod  (char *, char **);
  37      =2  extern long          strtol  (char *, char **, unsigned char);
  38      =2  extern unsigned long strtoul (char *, char **, unsigned char);
  39      =2  
  40      =2  #define _MALLOC_MEM_    xdata
  41      =2  
  42      =2  extern int  init_mempool          (void _MALLOC_MEM_ *p, unsigned int size);
  43      =2  extern void _MALLOC_MEM_ *malloc  (unsigned int size);
  44      =2  extern void free                  (void _MALLOC_MEM_ *p);
  45      =2  extern void _MALLOC_MEM_ *realloc (void _MALLOC_MEM_ *p, unsigned int size);
  46      =2  extern void _MALLOC_MEM_ *calloc  (unsigned int size, unsigned int len);
  47      =2  
  48      =2  #pragma RESTORE
   6      =1  #include <ctype.h>
   1      =2  /*--------------------------------------------------------------------------
   2      =2  CTYPE.H
   3      =2  
   4      =2  Prototypes for character functions.
   5      =2  Copyright (c) 1988-2001 Keil Elektronik GmbH and Keil Software, Inc.
   6      =2  All rights reserved.
   7      =2  --------------------------------------------------------------------------*/
   8      =2  
   9      =2  #pragma SAVE
  10      =2  #pragma REGPARMS
  11      =2  extern bit isalpha (unsigned char);
  12      =2  extern bit isalnum (unsigned char);
  13      =2  extern bit iscntrl (unsigned char);
  14      =2  extern bit isdigit (unsigned char);
  15      =2  extern bit isgraph (unsigned char);
  16      =2  extern bit isprint (unsigned char);
  17      =2  extern bit ispunct (unsigned char);
  18      =2  extern bit islower (unsigned char);
  19      =2  extern bit isupper (unsigned char);
  20      =2  extern bit isspace (unsigned char);
  21      =2  extern bit isxdigit (unsigned char);
  22      =2  extern unsigned char tolower (unsigned char);
  23      =2  extern unsigned char toupper (unsigned char);
  24      =2  extern unsigned char toint (unsigned char);
  25      =2  
  26      =2  #define _tolower(c) ( (c)-'A'+'a' )
  27      =2  #define _toupper(c) ( (c)-'a'+'A' )
  28      =2  #define toascii(c)  ( (c) & 0x7F )
  29      =2  #pragma RESTORE
   7      =1  #include "..\Inc\GLOBAL.h"
   1      =2  
   2      =2  #ifndef _GLOBAL_DEFINE
   3      =2   #define _GLOBAL_DEFINE
   4      =2  
   5      =2  #define LOW             0               //高电平逻辑值
   6      =2  #define HIGH            1               //低电平逻辑值
C51 COMPILER V6.23a  FATINIT                                                               12/24/2004 00:11:37 PAGE 4   

   7      =2  
   8      =2  #define FALSE           0               //逻辑假值
   9      =2  #define TRUE            1               //逻辑真值
  10      =2  
  11      =2  //置位操作
  12      =2  #define SET_BIT_0(X)    X=X|0x01
  13      =2  #define SET_BIT_1(X)    X=X|0x02
  14      =2  #define SET_BIT_2(X)    X=X|0x04
  15      =2  #define SET_BIT_3(X)    X=X|0x08
  16      =2  #define SET_BIT_4(X)    X=X|0x10
  17      =2  #define SET_BIT_5(X)    X=X|0x20
  18      =2  #define SET_BIT_6(X)    X=X|0x40
  19      =2  #define SET_BIT_7(X)    X=X|0x80
  20      =2  
  21      =2  //清零操作
  22      =2  #define CLEAR_BIT_0(X)  X=X&0xfe
  23      =2  #define CLEAR_BIT_1(X)  X=X&0xfd
  24      =2  #define CLEAR_BIT_2(X)  X=X&0xfb
  25      =2  #define CLEAR_BIT_3(X)  X=X&0xe7
  26      =2  #define CLEAR_BIT_4(X)  X=X&0xef
  27      =2  #define CLEAR_BIT_5(X)  X=X&0xdf
  28      =2  #define CLEAR_BIT_6(X)  X=X&0xbf
  29      =2  #define CLEAR_BIT_7(X)  X=X&0x7f
  30      =2  
  31      =2  //#define DISK_SECTOR_SIZE      32
  32      =2  
  33      =2  //数据类型定义
  34      =2  
  35      =2  
  36      =2  #ifndef _TYPE_DEFINE
  37      =2   #define _TYPE_DEFINE
  38      =2   typedef bit BOOL;
  39      =2   typedef unsigned char BYTE;
  40      =2   typedef unsigned char CHAR;
  41      =2   typedef unsigned int WORD;
  42      =2   typedef unsigned long DWORD;
  43      =2  #endif
  44      =2  
  45      =2  #endif
   8      =1  #include "..\Inc\COMMON.h"
   1      =2  /********************************************************/
   2      =2  /*                                                      */
   3      =2  /*  库   名   称:通 用 函 数 库                        */
   4      =2  
   5      =2  /*  功 能  描 述:通用函数库。                          */
   6      =2  
   7      =2  /********************************************************/
   8      =2  
   9      =2  //设备类型
  10      =2  #define MEDIA_TYPE_HDD                                          0x01            //硬盘
  11      =2  #define MEDIA_TYPE_CDROM                                        0x02            //光驱
  12      =2  #define MEDIA_TYPE_FLASH                                        0x03            //FLASH
  13      =2  
  14      =2  #ifndef _COMMON_DEFINE
  15      =2   #define _COMMON_DEFINE
  16      =2  
  17      =2  #endif
  18      =2  
  19      =2  extern void COMMVersion(void);
  20      =2  extern WORD MEMSwap16(WORD value);
  21      =2  extern DWORD MEMSwap32(DWORD value);
  22      =2  extern void Uni2GB(char *s,CHAR len);
C51 COMPILER V6.23a  FATINIT                                                               12/24/2004 00:11:37 PAGE 5   

  23      =2  extern void WORD2CHAR(WORD in,CHAR *out,BYTE l);
  24      =2  extern void BYTE2CHAR(BYTE in,CHAR *out,BYTE l);
  25      =2  

⌨️ 快捷键说明

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