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

📄 disc.lst

📁 Philips LPC2138 Demo Application with Keil C
💻 LST
字号:
ARM COMPILER V2.42,  disc                                                                  27/03/06  10:45:48  PAGE 1   


ARM COMPILER V2.42, COMPILATION OF MODULE disc
OBJECT MODULE PLACED IN .\obj\disc.obj
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe src\disc.c THUMB DEBUG PRINT(.\LST\DISC.LST) TABS(4) OBJECT(.\obj\disc.obj) 

stmt  level    source

    1          /*****************************************************************************\
    2          *              efs - General purpose Embedded Filesystem library              *
    3          *          --------------------- -----------------------------------          *
    4          *                                                                             *
    5          * Filename : disc.c                                                           *
    6          * Description : This file contains the functions regarding the whole disc     *
    7          *               such as loading the MBR and performing read/write tests.      *
    8          *                                                                             *
    9          * This library is free software; you can redistribute it and/or               *
   10          * modify it under the terms of the GNU Lesser General Public                  *
   11          * License as published by the Free Software Foundation; either                *
   12          * version 2.1 of the License, or (at your option) any later version.          *
   13          *                                                                             *
   14          * This library is distributed in the hope that it will be useful,             *
   15          * but WITHOUT ANY WARRANTY; without even the implied warranty of              *
   16          * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU           *
   17          * Lesser General Public License for more details.                             *
   18          *                                                                             *
   19          *                                                    (c)2004 Lennart Yseboodt *
   20          *                                                    (c)2004 Michael De Nil   *
   21          \*****************************************************************************/
   22          
   23          /*****************************************************************************/
   24          #include "disc.h"
   25          /*****************************************************************************/
   26          
   27          /* ****************************************************************************  
   28           * void disc_initDisc(Disc *disc,hcInterface* source)
   29           * Description: This initialises the disc by loading the MBR and setting the
   30           * pointer to the hardware object.
   31          */
   32          void disc_initDisc(Disc *disc,IOManager* ioman)
   33          {
   34   1          disc->ioman=ioman;
   35   1          disc_setError(disc,DISC_NOERROR);
   36   1          disc_loadMBR(disc);
   37   1      }
   38          /*****************************************************************************/ 
   39          
   40          /* ****************************************************************************  
   41           * void disc_loadMBR(Disc *disc)
   42           * Description: This functions copies the partitiontable to the partitions field.
   43          */
   44          void disc_loadMBR(Disc *disc)
   45          {
   46   1          euint8 x;
   47   1          euint8 *buf;
   48   1          
   49   1          buf=ioman_getSector(disc->ioman,LBA_ADDR_MBR,IOM_MODE_READONLY|IOM_MODE_EXP_REQ);
   50   1          for(x=0;x<4;x++){
   51   2              ex_getPartitionField(buf,&(disc->partitions[x]),PARTITION_TABLE_OFFSET+(x*SIZE_PARTITION_FIELD));
   52   2          }
   53   1          ioman_releaseSector(disc->ioman,buf);
   54   1      }
   55          /*****************************************************************************/ 
   56          
   57          
ARM COMPILER V2.42,  disc                                                                  27/03/06  10:45:48  PAGE 2   

ASSEMBLY LISTING OF GENERATED OBJECT CODE



*** EXTERNALS:
 EXTERN CODE16 (ioman_getSector?T)
 EXTERN CODE16 (ioman_releaseSector?T)
 EXTERN CODE16 (ex_getPartitionField?T)



*** PUBLICS:
 PUBLIC         disc_initDisc?T
 PUBLIC         disc_loadMBR?T



*** CODE SEGMENT '?PR?disc_initDisc?T?disc':
   32: void disc_initDisc(Disc *disc,IOManager* ioman)
 00000000  B500      PUSH        {LR}
 00000002  1C0B      MOV         R3,R1 ; ioman
 00000004  ---- Variable 'ioman' assigned to Register 'R3' ----
 00000004  1C02      MOV         R2,R0 ; disc
 00000006  ---- Variable 'disc' assigned to Register 'R2' ----
   34:     disc->ioman=ioman;
 00000006  1C19      MOV         R1,R3 ; ioman
 00000008  1C10      MOV         R0,R2 ; disc
 0000000A  6001      STR         R1,[R0,#0x0] ; disc
   35:     disc_setError(disc,DISC_NOERROR);
 0000000C  2100      MOV         R1,#0x0
 0000000E  1C10      MOV         R0,R2 ; disc
 00000010  7101      STRB        R1,[R0,#0x4]
   36:     disc_loadMBR(disc);
 00000012  1C10      MOV         R0,R2 ; disc
 00000014  F7FF      BL          disc_loadMBR?T  ; T=0x0001  (1)
 00000016  FFF4      BL          disc_loadMBR?T  ; T=0x0001  (2)
   37: }
 00000018  BC08      POP         {R3}
 0000001A  4718      BX          R3
 0000001C          ENDP ; 'disc_initDisc?T'


*** CODE SEGMENT '?PR?disc_loadMBR?T?disc':
   44: void disc_loadMBR(Disc *disc)
 00000000  B570      PUSH        {R4-R6,LR}
 00000002  1C05      MOV         R5,R0 ; disc
 00000004  ---- Variable 'disc' assigned to Register 'R5' ----
   45: {
 00000004            ; SCOPE-START
   49:     buf=ioman_getSector(disc->ioman,LBA_ADDR_MBR,IOM_MODE_READONLY|IOM_MODE_EXP_REQ);
 00000004  1C28      MOV         R0,R5 ; disc
 00000006  6800      LDR         R0,[R0,#0x0] ; disc
 00000008  2100      MOV         R1,#0x0
 0000000A  2205      MOV         R2,#0x5
 0000000C  F7FF      BL          ioman_getSector?T  ; T=0x0001  (1)
 0000000E  FFF8      BL          ioman_getSector?T  ; T=0x0001  (2)
 00000010  1C04      MOV         R4,R0 ; buf
 00000012  ---- Variable 'buf' assigned to Register 'R4' ----
   50:     for(x=0;x<4;x++){
 00000012  2600      MOV         R6,#0x0
 00000014  ---- Variable 'x' assigned to Register 'R6' ----
 00000014  E00E      B           L_3  ; T=0x00000034
 00000016          L_4:
   51:         ex_getPartitionField(buf,&(disc->partitions[x]),PARTITION_TABLE_OFFSET+(x*SIZE_PARTITION_FIELD));
 00000016  1C30      MOV         R0,R6 ; x
 00000018  0603      LSL         R3,R0,#0x18 ; x
 0000001A  0E1B      LSR         R3,R3,#0x18
 0000001C  011B      LSL         R3,R3,#0x4
 0000001E  4800      LDR         R2,=0x1BE
 00000020  189A      ADD         R2,R3,R2
 00000022  1C29      MOV         R1,R5 ; disc
 00000024  18C9      ADD         R1,R3 ; disc
 00000026  3108      ADD         R1,#0x8
ARM COMPILER V2.42,  disc                                                                  27/03/06  10:45:48  PAGE 3   

 00000028  1C20      MOV         R0,R4 ; buf
 0000002A  F7FF      BL          ex_getPartitionField?T  ; T=0x0001  (1)
 0000002C  FFE9      BL          ex_getPartitionField?T  ; T=0x0001  (2)
   52:     }
 0000002E  3601      ADD         R6,#0x1
 00000030  0636      LSL         R6,R6,#0x18
 00000032  0E36      LSR         R6,R6,#0x18
 00000034          L_3:
 00000034  1C30      MOV         R0,R6 ; x
 00000036  0600      LSL         R0,R0,#0x18 ; x
 00000038  0E00      LSR         R0,R0,#0x18
 0000003A  2804      CMP         R0,#0x4
 0000003C  DBEB      BLT         L_4  ; T=0x00000016
   53:     ioman_releaseSector(disc->ioman,buf);
 0000003E  1C28      MOV         R0,R5 ; disc
 00000040  6800      LDR         R0,[R0,#0x0] ; disc
 00000042  1C21      MOV         R1,R4 ; buf
 00000044  F7FF      BL          ioman_releaseSector?T  ; T=0x0001  (1)
 00000046  FFDC      BL          ioman_releaseSector?T  ; T=0x0001  (2)
 00000048            ; SCOPE-END
   54: }
 00000048  BC70      POP         {R4-R6}
 0000004A  BC08      POP         {R3}
 0000004C  4718      BX          R3
 0000004E          ENDP ; 'disc_loadMBR?T'



Module Information          Static
----------------------------------
  code size            =    ------
  data size            =    ------
  const size           =    ------
End of Module Information.


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

⌨️ 快捷键说明

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