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

📄 file.lst

📁 这是atmel公司的89C51SND1C的mp3源程序
💻 LST
字号:
C51 COMPILER V6.20c  FILE                                                                  07/10/2002 15:17:48 PAGE 1   


C51 COMPILER V6.20c, COMPILATION OF MODULE FILE
OBJECT MODULE PLACED IN ..\obj\file.obj
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE ..\src\file\file.c BROWSE INCDIR(..\src\system;..\..\..\lib) DEFINE(KEIL) D
                    -EBUG OBJECTEXTEND PRINT(.\file.lst) OBJECT(..\obj\file.obj) 

stmt level    source

   1          /*C**************************************************************************
   2          * $RCSfile: file.c,v $
   3          *----------------------------------------------------------------------------
   4          * Copyright (c) 2002 Atmel.
   5          *----------------------------------------------------------------------------
   6          * RELEASE:      $Name: DEMO_FAT_1_2_5 $      
   7          * REVISION:     $Revision: 1.4 $     
   8          * FILE_CVSID:   $Id: file.c,v 1.4 2002/06/06 15:21:05 ffosse Exp $       
   9          *----------------------------------------------------------------------------
  10          * PURPOSE:
  11          * This file contains extention routines to the file system
  12          *****************************************************************************/
  13          
  14          /*_____ I N C L U D E S ____________________________________________________*/
  15          
  16          #include "config.h"                         /* system configuration   */
  17          #include "..\display\disp_task.h"           /* display task definition */
  18          #include "..\file\file.h"                   /* file system definition */
  19          
  20          /*_____ M A C R O S ________________________________________________________*/
  21          
  22          #define F_SEEK_TIME ((Byte)4)
  23          
  24          
  25          /*_____ D E F I N I T I O N ________________________________________________*/
  26          
  27          
  28          /*_____ D E C L A R A T I O N ______________________________________________*/
  29          
  30          
  31          /*F**************************************************************************
  32          * NAME: file_seek_prev
  33          *----------------------------------------------------------------------------
  34          * PARAMS:
  35          *   ext: file type identifier
  36          *
  37          * return:
  38          *----------------------------------------------------------------------------
  39          * PURPOSE:
  40          *   Select previous file with specified extension
  41          *----------------------------------------------------------------------------
  42          * EXAMPLE:
  43          *----------------------------------------------------------------------------
  44          * NOTE:
  45          *   Depending on the time played, this function selects the previous file
  46          *   or restarts the file under playing.
  47          *----------------------------------------------------------------------------
  48          * REQUIREMENTS:
  49          *****************************************************************************/
  50          void file_seek_prev (Byte id)
  51          {
  52   1        if ((disp_get_sec() < F_SEEK_TIME) && (disp_get_min() == 0))
  53   1        {
  54   2          while (File_goto_prev() == OK)
C51 COMPILER V6.20c  FILE                                                                  07/10/2002 15:17:48 PAGE 2   

  55   2          {
  56   3            /* a file or a directory exists */
  57   3            if ((File_type() & id) != 0)            /* specified file type found */
  58   3            { 
  59   4              return;                               /* exit when found */
  60   4            }
  61   3          }
  62   2          /* beginning of dir */
  63   2          if (File_goto_last() == OK)               /* goto to the end of dir */
  64   2          {
  65   3            do
  66   3            {
  67   4              if ((File_type() & id) != 0)          /* look for a specified file */
  68   4              {                                     /* specified file type found */
  69   5                return;                             /* exit when found */
  70   5              }
  71   4            }
  72   3            while (File_goto_prev() == OK);      
  73   3          }
  74   2        }
  75   1      }
  76          
  77          
  78          /*F**************************************************************************
  79          * NAME: file_seek_next
  80          *----------------------------------------------------------------------------
  81          * PARAMS:
  82          *   id:   file type identifier
  83          *   loop: loop to the first file
  84          *
  85          * return:
  86          *----------------------------------------------------------------------------
  87          * PURPOSE:
  88          *   Select next file with specified extension
  89          *----------------------------------------------------------------------------
  90          * EXAMPLE:
  91          *----------------------------------------------------------------------------
  92          * NOTE:
  93          *----------------------------------------------------------------------------
  94          * REQUIREMENTS:
  95          *****************************************************************************/
  96          bit file_seek_next (Byte id, bit loop)
  97          {
  98   1        
  99   1        while (File_goto_next() == OK)
 100   1        {
 101   2          /* file or dir found */
 102   2          if ((File_type() & id) != 0)
 103   2          { /* specified file type found */
 104   3            return TRUE;                          /* exit when found */
 105   3          }
 106   2        }
 107   1                                                  /* end of dir */
 108   1        if (File_goto_first() == OK)              /* goto beginning of the dir */
 109   1        {
 110   2          if (loop)                               /* loop ? */
 111   2          {                                       /* re-start at the beginning */
 112   3            do
 113   3            {
 114   4              if ((File_type() & id) != 0)        /* look for a specified file */
 115   4              {                                   /* specified file type found */
 116   5                return TRUE;                      /* exit when found */
C51 COMPILER V6.20c  FILE                                                                  07/10/2002 15:17:48 PAGE 3   

 117   5              }
 118   4            }
 119   3            while (File_goto_next() == OK);      
 120   3            return FALSE;                         /* no specified file in the dir */
 121   3          }
 122   2          else                                    /* no loop */
 123   2          {
 124   3            return FALSE;                         /* Stop at the beginning */
 125   3          }
 126   2        }
 127   1        else
 128   1          return FALSE;
 129   1      }
 130          
 131          
 132          /*F**************************************************************************
 133          * NAME: file_entry_dir
 134          *----------------------------------------------------------------------------
 135          * PARAMS:
 136          *   id: file type identifier
 137          *
 138          * return:
 139          *   OK: file type found
 140          *   KO: file type not found
 141          *----------------------------------------------------------------------------
 142          * PURPOSE:
 143          *   Enter a directory
 144          *----------------------------------------------------------------------------
 145          * EXAMPLE:
 146          *----------------------------------------------------------------------------
 147          * NOTE:
 148          *----------------------------------------------------------------------------
 149          * REQUIREMENTS:
 150          *****************************************************************************/
 151          bit file_entry_dir (Byte id)
 152          {
 153   1        if (File_type() == FILE_DIR)              /* only for directory! */
 154   1        { /* stopped on a directory */
 155   2          if (File_goto_child(id) != OK)
 156   2          {
 157   3            /* no file in dir */
 158   3            return File_goto_parent(id); 
 159   3          }
 160   2          else
 161   2           return OK;
 162   2        }
 163   1      }
 164          
 165          
 166          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    117    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       3
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       1
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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