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

📄 fs.lst

📁 Philips LPC2138 Demo Application with Keil C
💻 LST
📖 第 1 页 / 共 5 页
字号:
 00000004  303C      ADD         R0,#0x3C
 00000006  7800      LDRB        R0,[R0,#0x0]
 00000008  2803      CMP         R0,#0x3
 0000000A  D113      BNE         L_36  ; T=0x00000034
  203:         fs->FirstSectorRootDir = fs->volumeId.ReservedSectorCount + 
 0000000C  1C10      MOV         R0,R2 ; fs
 0000000E  7A80      LDRB        R0,[R0,#0xA]
 00000010  1C03      MOV         R3,R0
 00000012  1C10      MOV         R0,R2 ; fs
 00000014  6980      LDR         R0,[R0,#0x18]
 00000016  4343      MUL         R3,R0
 00000018  1C10      MOV         R0,R2 ; fs
 0000001A  8900      LDRH        R0,[R0,#0x8]
 0000001C  1C01      MOV         R1,R0
 0000001E  18C9      ADD         R1,R3
 00000020  1C10      MOV         R0,R2 ; fs
 00000022  69C0      LDR         R0,[R0,#0x1C]
 00000024  3802      SUB         R0,#0x2
 00000026  1C13      MOV         R3,R2 ; fs
 00000028  799B      LDRB        R3,[R3,#0x6]
 0000002A  4358      MUL         R0,R3
 0000002C  1809      ADD         R1,R0
 0000002E  1C10      MOV         R0,R2 ; fs
 00000030  62C1      STR         R1,[R0,#0x2C]
 00000032  E00C      B           L_37  ; T=0x0000004E
 00000034          L_36:
  207:         fs->FirstSectorRootDir = fs->volumeId.ReservedSectorCount + 
 00000034  1C10      MOV         R0,R2 ; fs
 00000036  8A00      LDRH        R0,[R0,#0x10]
 00000038  1C01      MOV         R1,R0
 0000003A  1C10      MOV         R0,R2 ; fs
 0000003C  7A80      LDRB        R0,[R0,#0xA]
 0000003E  1C03      MOV         R3,R0
 00000040  434B      MUL         R3,R1
 00000042  1C10      MOV         R0,R2 ; fs
 00000044  8900      LDRH        R0,[R0,#0x8]
 00000046  1C01      MOV         R1,R0
 00000048  18C9      ADD         R1,R3
 0000004A  1C10      MOV         R0,R2 ; fs
 0000004C  62C1      STR         R1,[R0,#0x2C]
 0000004E          L_37:
  209: }
 0000004E  4770      BX          R14
 00000050          ENDP ; 'fs_findFirstSectorRootDir?T'

ARM COMPILER V2.42,  fs                                                                    27/03/06  10:45:50  PAGE 18  


*** CODE SEGMENT '?PR?fs_initCurrentDir?T?fs':
  212: void fs_initCurrentDir(FileSystem *fs)
 00000000  B510      PUSH        {R4,LR}
 00000002  1C04      MOV         R4,R0 ; fs
 00000004  ---- Variable 'fs' assigned to Register 'R4' ----
  214:     fs->FirstClusterCurrentDir = fs_getFirstClusterRootDir(fs);
 00000004  1C20      MOV         R0,R4 ; fs
 00000006  F7FF      BL          fs_getFirstClusterRootDir?T  ; T=0x0001  (1)
 00000008  FFFB      BL          fs_getFirstClusterRootDir?T  ; T=0x0001  (2)
 0000000A  1C21      MOV         R1,R4 ; fs
 0000000C  6308      STR         R0,[R1,#0x30]
  215: }
 0000000E  BC10      POP         {R4}
 00000010  BC08      POP         {R3}
 00000012  4718      BX          R3
 00000014          ENDP ; 'fs_initCurrentDir?T'


*** CODE SEGMENT '?PR?fs_clusterToSector?T?fs':
  224: euint32 fs_clusterToSector(FileSystem *fs,euint32 cluster)
 00000000  B510      PUSH        {R4,LR}
 00000002  1C0B      MOV         R3,R1 ; cluster
 00000004  ---- Variable 'cluster' assigned to Register 'R3' ----
 00000004  1C04      MOV         R4,R0 ; fs
 00000006  ---- Variable 'fs' assigned to Register 'R4' ----
 00000006  ---- Variable 'base' assigned to Register 'R2' ----
  225: {
 00000006            ; SCOPE-START
  228:     if(fs->type==FAT32)
 00000006  1C20      MOV         R0,R4 ; fs
 00000008  303C      ADD         R0,#0x3C
 0000000A  7800      LDRB        R0,[R0,#0x0]
 0000000C  2803      CMP         R0,#0x3
 0000000E  D10A      BNE         L_38  ; T=0x00000026
  230:         base=
 00000010  1C20      MOV         R0,R4 ; fs
 00000012  7A80      LDRB        R0,[R0,#0xA]
 00000014  1C02      MOV         R2,R0
 00000016  1C20      MOV         R0,R4 ; fs
 00000018  6A41      LDR         R1,[R0,#0x24]
 0000001A  4351      MUL         R1,R2
 0000001C  1C20      MOV         R0,R4 ; fs
 0000001E  8900      LDRH        R0,[R0,#0x8]
 00000020  1C02      MOV         R2,R0
 00000022  1852      ADD         R2,R1
  233:     }
 00000024  E010      B           L_39  ; T=0x00000048
 00000026          L_38:
  236:         base=
 00000026  1C20      MOV         R0,R4 ; fs
 00000028  7A80      LDRB        R0,[R0,#0xA]
 0000002A  1C02      MOV         R2,R0
 0000002C  1C20      MOV         R0,R4 ; fs
 0000002E  6A41      LDR         R1,[R0,#0x24]
 00000030  4351      MUL         R1,R2
 00000032  1C20      MOV         R0,R4 ; fs
 00000034  8900      LDRH        R0,[R0,#0x8]
 00000036  1C02      MOV         R2,R0
 00000038  1852      ADD         R2,R1
 0000003A  1C20      MOV         R0,R4 ; fs
 0000003C  8980      LDRH        R0,[R0,#0xC]
 0000003E  2110      MOV         R1,#0x10
 00000040  F7FF      BL          ?C?SDIV?T  ; T=0x0001  (1) ; ?C?SDIV?T
 00000042  FFDE      BL          ?C?SDIV?T  ; T=0x0001  (2) ; ?C?SDIV?T
 00000044  1C08      MOV         R0,R1
 00000046  1812      ADD         R2,R0
  240:     }
 00000048          L_39:
ARM COMPILER V2.42,  fs                                                                    27/03/06  10:45:50  PAGE 19  

  241:     return( base + (cluster-2)*fs->volumeId.SectorsPerCluster );
 00000048  1C20      MOV         R0,R4 ; fs
 0000004A  7980      LDRB        R0,[R0,#0x6]
 0000004C  1C19      MOV         R1,R3 ; cluster
 0000004E  3902      SUB         R1,#0x2
 00000050  4341      MUL         R1,R0
 00000052  1C10      MOV         R0,R2 ; base
 00000054  1840      ADD         R0,R1 ; base
 00000056            ; SCOPE-END
  242: }
 00000056  BC10      POP         {R4}
 00000058  BC08      POP         {R3}
 0000005A  4718      BX          R3
 0000005C          ENDP ; 'fs_clusterToSector?T'


*** CODE SEGMENT '?PR?fs_sectorToCluster?T?fs':
  246: euint32 fs_sectorToCluster(FileSystem *fs,euint32 sector)
 00000000  B570      PUSH        {R4-R6,LR}
 00000002  1C0E      MOV         R6,R1 ; sector
 00000004  ---- Variable 'sector' assigned to Register 'R6' ----
 00000004  1C05      MOV         R5,R0 ; fs
 00000006  ---- Variable 'fs' assigned to Register 'R5' ----
 00000006  ---- Variable 'base' assigned to Register 'R2' ----
  247: {
 00000006            ; SCOPE-START
  250:     if(fs->type==FAT32)
 00000006  1C28      MOV         R0,R5 ; fs
 00000008  303C      ADD         R0,#0x3C
 0000000A  7800      LDRB        R0,[R0,#0x0]
 0000000C  2803      CMP         R0,#0x3
 0000000E  D10A      BNE         L_41  ; T=0x00000026
  252:         base=
 00000010  1C28      MOV         R0,R5 ; fs
 00000012  7A80      LDRB        R0,[R0,#0xA]
 00000014  1C02      MOV         R2,R0
 00000016  1C28      MOV         R0,R5 ; fs
 00000018  6A41      LDR         R1,[R0,#0x24]
 0000001A  4351      MUL         R1,R2
 0000001C  1C28      MOV         R0,R5 ; fs
 0000001E  8900      LDRH        R0,[R0,#0x8]
 00000020  1C02      MOV         R2,R0
 00000022  1852      ADD         R2,R1
  255:     }
 00000024  E010      B           L_42  ; T=0x00000048
 00000026          L_41:
  258:         base=
 00000026  1C28      MOV         R0,R5 ; fs
 00000028  7A80      LDRB        R0,[R0,#0xA]
 0000002A  1C02      MOV         R2,R0
 0000002C  1C28      MOV         R0,R5 ; fs
 0000002E  6A41      LDR         R1,[R0,#0x24]
 00000030  4351      MUL         R1,R2
 00000032  1C28      MOV         R0,R5 ; fs
 00000034  8900      LDRH        R0,[R0,#0x8]
 00000036  1C02      MOV         R2,R0
 00000038  1852      ADD         R2,R1
 0000003A  1C28      MOV         R0,R5 ; fs
 0000003C  8980      LDRH        R0,[R0,#0xC]
 0000003E  2110      MOV         R1,#0x10
 00000040  F7FF      BL          ?C?SDIV?T  ; T=0x0001  (1) ; ?C?SDIV?T
 00000042  FFDE      BL          ?C?SDIV?T  ; T=0x0001  (2) ; ?C?SDIV?T
 00000044  1C08      MOV         R0,R1
 00000046  1812      ADD         R2,R0
  262:     }
 00000048          L_42:
  263:     return(((sector-base)-((sector-base)%fs->volumeId.SectorsPerCluster))/fs->volumeId.SectorsPerCluster+2 );
 00000048  1C10      MOV         R0,R2 ; base
ARM COMPILER V2.42,  fs                                                                    27/03/06  10:45:50  PAGE 20  

 0000004A  1C34      MOV         R4,R6 ; sector
 0000004C  1A24      SUB         R4,R0 ; sector
 0000004E  1C28      MOV         R0,R5 ; fs
 00000050  7980      LDRB        R0,[R0,#0x6]
 00000052  1C03      MOV         R3,R0
 00000054  1C20      MOV         R0,R4
 00000056  1C19      MOV         R1,R3
 00000058  F7FF      BL          ?C?UDIV?T  ; T=0x0001  (1) ; ?C?UDIV?T
 0000005A  FFD2      BL          ?C?UDIV?T  ; T=0x0001  (2) ; ?C?UDIV?T
 0000005C  1C01      MOV         R1,R0
 0000005E  1A60      SUB         R0,R4,R1
 00000060  1C19      MOV         R1,R3
 00000062  F7FF      BL          ?C?UDIV?T  ; T=0x0001  (1) ; ?C?UDIV?T
 00000064  FFCD      BL          ?C?UDIV?T  ; T=0x0001  (2) ; ?C?UDIV?T
 00000066  1C08      MOV         R0,R1
 00000068  3002      ADD         R0,#0x2
 0000006A            ; SCOPE-END
  264: }
 0000006A  BC70      POP         {R4-R6}
 0000006C  BC08      POP         {R3}
 0000006E  4718      BX          R3
 00000070          ENDP ; 'fs_sectorToCluster?T'


*** CODE SEGMENT '?PR?fs_getNextFreeCluster?T?fs':
  275: euint32 fs_getNextFreeCluster(FileSystem *fs,euint32 startingcluster)
 00000000  B570      PUSH        {R4-R6,LR}
 00000002  1C0D      MOV         R5,R1 ; startingcluster
 00000004  ---- Variable 'startingcluster' assigned to Register 'R5' ----
 00000004  1C04      MOV         R4,R0 ; fs
 00000006  ---- Variable 'fs' assigned to Register 'R4' ----
  276: {
 00000006            ; SCOPE-START
  279:     while(startingcluster<fs->DataClusterCount){
 00000006  E00B      B           L_44  ; T=0x00000020
 00000008          L_46:
  280:         r=fat_getNextClusterAddress(fs,startingcluster,0);
 00000008  1C20      MOV         R0,R4 ; fs
 0000000A  1C29      MOV         R1,R5 ; startingcluster
 0000000C  2200      MOV         R2,#0x0
 0000000E  F7FF      BL          fat_getNextClusterAddress?T  ; T=0x0001  (1)
 00000010  FFF7      BL          fat_getNextClusterAddress?T  ; T=0x0001  (2)
 00000012  1C06      MOV         R6,R0 ; r
 00000014  ---- Variable 'r' assigned to Register 'R6' ----
  281:         if(r==0){
 00000014  1C30      MOV         R0,R6 ; r
 00000016  2800      CMP         R0,#0x0 ; r
 00000018  D101      BNE         L_48  ; T=0x0000001E
  282:             return(startingcluster);
 0000001A  1C28      MOV         R0,R5 ; startingcluster
 0000001C  E006      B           L_49  ; T=0x0000002C
  283:         }
 0000001E          L_48:
  284:         startingcluster++;
 0000001E  3501      ADD         R5,#0x1
  285:     }
 00000020          L_44:
 00000020  1C20      MOV         R0,R4 ; fs
 00000022  6A02      LDR         R2,[R0,#0x20]
 00000024  1C28      MOV         R0,R5 ; startingcluster
 00000026  4290      CMP         R0,R2 ; startingcluster
 00000028  D3EE      BCC         L_46  ; T=0x00000008
  286:     return(0);
 0000002A  2000      MOV         R0,#0x0
 0000002C            ; SCOPE-END
  287: }
 0000002C          L_49:
 0000002C  BC70      POP         {R4-R6}
ARM COMPILER V2.42,  fs                                                                    27/03/06  10:45:50  PAGE 21  

 0000002E  BC08      POP         {R3}
 00000030  4718      BX          R3
 00000032          ENDP ; 'fs_getNextFreeCluster?T'


*** CODE SEGMENT '?PR?fs_giveFreeClusterHint?T?fs':
  302:     return(2); /* Now THIS is a hint ;) */
 00000000  2002      MOV         R0,#0x2
  303: }
 00000002  4770      BX          R14
 00000004          ENDP ; 'fs_giveFreeClusterHint?T'


*** CODE SEGMENT '?PR?fs_findFile?T?fs':
  322: esint8 fs_findFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint32 *lastDir)
 00000000  B5F0      PUSH        {R4-R7,LR}
 00000002  1C1F      MOV         R7,R3 ; l

⌨️ 快捷键说明

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