////////////////////////////////////////////////////////////////////////////// // / // IAR ARM ANSI C/C++ Compiler V4.40A/W32 EVALUATION 28/Mar/2008 19:07:32 / // Copyright 1999-2005 IAR Systems. All rights reserved. / // / // Cpu mode = interwork / // Endian = little / // Stack alignment = 4 / // Source file = E:\Ivo\arm\IVOPLAY\mediafiles_base.c / // Command line = E:\Ivo\arm\IVOPLAY\mediafiles_base.c -D X65 -lC / // E:\Ivo\arm\IVOPLAY\Release\List\ -lA / // E:\Ivo\arm\IVOPLAY\Release\List\ -o / // E:\Ivo\arm\IVOPLAY\Release\Obj\ -s9 --no_cse / // --no_unroll --no_inline --no_code_motion --no_tbaa / // --no_clustering --no_scheduling --cpu_mode arm / // --endian little --cpu ARM926EJ-S --stack_align 4 / // --interwork -e --fpu None --dlib_config / // D:\arm\ARM\LIB\dl5tpainl8n.h -I D:\arm\ARM\INC\ / // List file = E:\Ivo\arm\IVOPLAY\Release\List\mediafiles_base.s79 / // / // / ////////////////////////////////////////////////////////////////////////////// NAME mediafiles_base RTMODEL "StackAlign4", "USED" RTMODEL "__cpu_mode", "__pcs__interwork" RTMODEL "__data_model", "absolute" RTMODEL "__endian", "little" RTMODEL "__rt_version", "6" RSEG CSTACK:DATA:NOROOT(2) PUBWEAK `?*?DATA_ID` MULTWEAK ??Create??rT MULTWEAK ??CreateBaseOfMediafiles??rT ??DataTable0 EQU 0 ??DataTable1 EQU 0 ??DataTable10 EQU 0 ??DataTable11 EQU 0 ??DataTable12 EQU 0 ??DataTable13 EQU 0 ??DataTable14 EQU 0 ??DataTable15 EQU 0 ??DataTable16 EQU 0 ??DataTable17 EQU 0 ??DataTable18 EQU 0 ??DataTable19 EQU 0 ??DataTable2 EQU 0 ??DataTable20 EQU 0 ??DataTable21 EQU 0 ??DataTable22 EQU 0 ??DataTable23 EQU 0 ??DataTable24 EQU 0 ??DataTable25 EQU 0 ??DataTable26 EQU 0 ??DataTable27 EQU 0 ??DataTable28 EQU 0 ??DataTable29 EQU 0 ??DataTable3 EQU 0 ??DataTable30 EQU 0 ??DataTable31 EQU 0 ??DataTable32 EQU 0 ??DataTable33 EQU 0 ??DataTable34 EQU 0 ??DataTable35 EQU 0 ??DataTable36 EQU 0 ??DataTable37 EQU 0 ??DataTable38 EQU 0 ??DataTable39 EQU 0 ??DataTable4 EQU 0 ??DataTable40 EQU 0 ??DataTable41 EQU 0 ??DataTable42 EQU 0 ??DataTable43 EQU 0 ??DataTable44 EQU 0 ??DataTable45 EQU 0 ??DataTable46 EQU 0 ??DataTable47 EQU 0 ??DataTable48 EQU 0 ??DataTable49 EQU 0 ??DataTable5 EQU 0 ??DataTable50 EQU 0 ??DataTable51 EQU 0 ??DataTable52 EQU 0 ??DataTable53 EQU 0 ??DataTable54 EQU 0 ??DataTable55 EQU 0 ??DataTable56 EQU 0 ??DataTable57 EQU 0 ??DataTable58 EQU 0 ??DataTable59 EQU 0 ??DataTable6 EQU 0 ??DataTable61 EQU 0 ??DataTable64 EQU 0 ??DataTable7 EQU 0 ??DataTable8 EQU 0 ??DataTable9 EQU 0 MULTWEAK ??GetFon??rA MULTWEAK ??GetKatalogfontcolour??rA MULTWEAK ??IsFile??rA MULTWEAK ??MenuKeys2??rT MULTWEAK ??OnRedraw3??rT MULTWEAK ??ViewFiles??rA MULTWEAK ??find_tegs??rT MULTWEAK ??strcmp_nocase??rA PUBWEAK ?init?tab?DATA_I PUBWEAK ?init?tab?DATA_Z PUBLIC Canvas2 PUBLIC Create FUNCTION Create,0601H LOCFRAME CSTACK, 1308, STACK PUBLIC CreateBaseOfMediafiles FUNCTION CreateBaseOfMediafiles,0201H LOCFRAME CSTACK, 772, STACK PUBLIC GUI_GUI PUBLIC MenuKeys2 FUNCTION MenuKeys2,0603H PUBLIC OnRedraw3 FUNCTION OnRedraw3,0603H LOCFRAME CSTACK, 52, STACK PUBLIC chotyry PUBLIC curent_state PUBLIC curentposition PUBLIC extension PUBLIC find_tegs FUNCTION find_tegs,0201H LOCFRAME CSTACK, 192, STACK PUBLIC gui_methods3 PUBLIC media PUBLIC search_state PUBLIC tosearch CFI Names cfiNames0 CFI StackFrame CFA R13 HUGEDATA CFI Resource R0:32, R1:32, R2:32, R3:32, R4:32, R5:32, R6:32, R7:32 CFI Resource R8:32, R9:32, R10:32, R11:32, R12:32, CPSR:32, R13:32 CFI Resource R14:32, SPSR:32 CFI VirtualResource ?RET:32 CFI EndNames cfiNames0 CFI Common cfiCommon0 Using cfiNames0 CFI CodeAlign 2 CFI DataAlign 4 CFI ReturnAddress ?RET CODE CFI CFA R13+0 CFI R0 Undefined CFI R1 Undefined CFI R2 Undefined CFI R3 Undefined CFI R4 SameValue CFI R5 SameValue CFI R6 SameValue CFI R7 SameValue CFI R8 SameValue CFI R9 SameValue CFI R10 SameValue CFI R11 SameValue CFI R12 Undefined CFI CPSR SameValue CFI R14 Undefined CFI SPSR SameValue CFI ?RET R14 CFI EndCommon cfiCommon0 CFI Common cfiCommon1 Using cfiNames0 CFI CodeAlign 4 CFI DataAlign 4 CFI ReturnAddress ?RET CODE CFI CFA R13+0 CFI R0 Undefined CFI R1 Undefined CFI R2 Undefined CFI R3 Undefined CFI R4 SameValue CFI R5 SameValue CFI R6 SameValue CFI R7 SameValue CFI R8 SameValue CFI R9 SameValue CFI R10 SameValue CFI R11 SameValue CFI R12 Undefined CFI CPSR SameValue CFI R14 Undefined CFI SPSR SameValue CFI ?RET R14 CFI EndCommon cfiCommon1 GetFon SYMBOL "GetFon" GetKatalogfontcolour SYMBOL "GetKatalogfontcolour" IsFile SYMBOL "IsFile" ViewFiles SYMBOL "ViewFiles" strcmp_nocase SYMBOL "strcmp_nocase" Create SYMBOL "Create" ??Create??rT SYMBOL "??rT", Create CreateBaseOfMediafiles SYMBOL "CreateBaseOfMediafiles" ??CreateBaseOfMediafiles??rT SYMBOL "??rT", CreateBaseOfMediafiles ??GetFon??rA SYMBOL "??rA", GetFon ??GetKatalogfontcolour??rA SYMBOL "??rA", GetKatalogfontcolour ??IsFile??rA SYMBOL "??rA", IsFile MenuKeys2 SYMBOL "MenuKeys2" ??MenuKeys2??rT SYMBOL "??rT", MenuKeys2 OnRedraw3 SYMBOL "OnRedraw3" ??OnRedraw3??rT SYMBOL "??rT", OnRedraw3 ??ViewFiles??rA SYMBOL "??rA", ViewFiles find_tegs SYMBOL "find_tegs" ??find_tegs??rT SYMBOL "??rT", find_tegs ??strcmp_nocase??rA SYMBOL "??rA", strcmp_nocase EXTERN GetFon FUNCTION GetFon,0200H EXTERN GetKatalogfontcolour FUNCTION GetKatalogfontcolour,0200H EXTERN IsFile FUNCTION IsFile,0202H EXTERN ViewFiles FUNCTION ViewFiles,0200H EXTERN kill_data FUNCTION kill_data,0602H EXTERN method FUNCTION method,0602H EXTERN onClose2 FUNCTION onClose2,0602H EXTERN onCreate2 FUNCTION onCreate2,0602H EXTERN onFocus2 FUNCTION onFocus2,0602H EXTERN onUnfocus2 FUNCTION onUnfocus2,0602H EXTERN playerfolder EXTERN strcmp_nocase FUNCTION strcmp_nocase,0202H RSEG DATA_C:CONST:SORT:NOROOT(0) `?`: DATA DC8 "4:" RSEG DATA_C:CONST:SORT:NOROOT(0) DATA DC8 "" RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%s%c" DC8 0, 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "Unknown album" DC8 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "Unknown track" DC8 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "Unknown artist" DC8 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%s\\*" DC8 0, 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%c%c%c" DC8 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%s\\%s" DC8 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%smediafiiles.txt" DC8 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?`: DATA DC8 "%s\015\012%s\015\012%s\015\012%s\015\012" DC8 0, 0, 0 RSEG DATA_C:CONST:SORT:NOROOT(2) `?` // 9 // 10 typedef struct // 11 { // 12 char shliah[210]; // 13 char artist[30]; // 14 char album[30]; // 15 char track[30]; // 16 }mediafile; RSEG DATA_Z:DATA:SORT:NOROOT(0) // 17 mediafile media[]; media: DS8 300 RSEG DATA_Z:DATA:SORT:NOROOT(2) // 18 char curent_state[30]; curent_state: DS8 32 RSEG DATA_C:CONST:SORT:NOROOT(2) // 19 const RECT Canvas2={0,0,131,175}; Canvas2: DATA DC16 0, 0, 131, 175 RSEG DATA_Z:DATA:SORT:NOROOT(2) // 20 int GUI_GUI; GUI_GUI: DS8 4 RSEG DATA_Z:DATA:SORT:NOROOT(2) // 21 int curentposition=0; curentposition: DS8 4 RSEG DATA_Z:DATA:SORT:NOROOT(2) // 22 char tosearch[256]; tosearch: DS8 256 RSEG DATA_Z:DATA:SORT:NOROOT(2) // 23 char search_state[256]; search_state: DS8 256 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock0 Using cfiCommon0 CFI NoFunction THUMB ??OnRedraw3??rT: BX PC Nop CFI EndBlock cfiBlock0 REQUIRE OnRedraw3 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock1 Using cfiCommon1 CFI Function OnRedraw3 ARM // 24 void OnRedraw3(MAIN_GUI *data) // OnRedraw // 25 { OnRedraw3: PUSH {R4,R5,LR} CFI ?RET Frame(CFA, -4) CFI R5 Frame(CFA, -8) CFI R4 Frame(CFA, -12) CFI CFA R13+12 // 26 WSHDR* a=AllocWS(128); MOV R0,#+128 SWI +293 MOV R4,R0 // 27 DrawImg(0,0,(int)GetFon()); _BLF GetFon,??GetFon??rA MOV R2,R0 MOV R1,#+0 MOV R0,#+0 SWI +35 // 28 wsprintf(a,pt,curent_state); LDR R2,??DataTable70 ;; curent_state LDR R1,??OnRedraw3_0 ;; pt MOV R0,R4 SWI +292 // 29 DrawString(a,1,3,130,15,FONT_SMALL_BOLD,TEXT_ALIGNLEFT,GetPaletteAdrByColorIndex(GetKatalogfontcolour()),GetPaletteAdrByColorIndex(23)); MOV R0,#+23 SWI +302 MOV R5,R0 _BLF GetKatalogfontcolour,??GetKatalogfontcolour??rA SWI +302 PUSH {R5} CFI CFA R13+16 PUSH {R0} CFI CFA R13+20 MOV R0,#+1 PUSH {R0} CFI CFA R13+24 MOV R0,#+8 PUSH {R0} CFI CFA R13+28 MOV R0,#+15 PUSH {R0} CFI CFA R13+32 MOV R3,#+130 MOV R2,#+3 MOV R1,#+1 MOV R0,R4 SWI +332 // 30 // 31 utf8_2ws(a,tosearch,320); MOV R2,#+320 LDR R1,??DataTable69 ;; tosearch MOV R0,R4 SWI +483 // 32 DrawString(a,2,20,130,100,FONT_SMALL,TEXT_ALIGNMIDDLE,GetPaletteAdrByColorIndex(GetKatalogfontcolour()),GetPaletteAdrByColorIndex(23)); MOV R0,#+23 SWI +302 MOV R5,R0 _BLF GetKatalogfontcolour,??GetKatalogfontcolour??rA SWI +302 PUSH {R5} CFI CFA R13+36 PUSH {R0} CFI CFA R13+40 MOV R0,#+2 PUSH {R0} CFI CFA R13+44 MOV R0,#+7 PUSH {R0} CFI CFA R13+48 MOV R0,#+100 PUSH {R0} CFI CFA R13+52 MOV R3,#+130 MOV R2,#+20 MOV R1,#+2 MOV R0,R4 SWI +332 ADD SP,SP,#+40 ;; stack cleaning CFI CFA R13+12 // 33 // 34 wsprintf(a,pt,search_state); LDR R2,??DataTable62 ;; search_state LDR R1,??OnRedraw3_0 ;; pt MOV R0,R4 SWI +292 // 35 DrawString(a,1,100,130,130,FONT_SMALL,TEXT_ALIGNLEFT,GetPaletteAdrByColorIndex(GetKatalogfontcolour()),GetPaletteAdrByColorIndex(23)); MOV R0,#+23 SWI +302 MOV R5,R0 _BLF GetKatalogfontcolour,??GetKatalogfontcolour??rA SWI +302 PUSH {R5} CFI CFA R13+16 PUSH {R0} CFI CFA R13+20 MOV R0,#+1 PUSH {R0} CFI CFA R13+24 MOV R0,#+7 PUSH {R0} CFI CFA R13+28 MOV R0,#+130 PUSH {R0} CFI CFA R13+32 MOV R3,R0 MOV R2,#+100 MOV R1,#+1 MOV R0,R4 SWI +332 // 36 // 37 FreeWS(a); MOV R0,R4 SWI +297 // 38 } ADD SP,SP,#+20 ;; stack cleaning CFI CFA R13+12 POP {R4,R5,PC} ;; return DATA ??OnRedraw3_0: DC32 pt CFI EndBlock cfiBlock1 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock2 Using cfiCommon0 CFI NoFunction THUMB ??MenuKeys2??rT: BX PC Nop CFI EndBlock cfiBlock2 REQUIRE MenuKeys2 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock3 Using cfiCommon1 CFI Function MenuKeys2 ARM // 39 int MenuKeys2(MAIN_GUI *data, GUI_MSG *msg) //OnKey // 40 { // 41 if ((msg->gbsmsg->msg==KEY_DOWN)) MenuKeys2: LDR R0,[R1, #+4] LDRSH R0,[R0, #+2] MOV R2,#+147 ORR R2,R2,#0x100 CMP R0,R2 BNE ??MenuKeys2_0 // 42 { // 43 switch(msg->gbsmsg->submess) LDR R0,[R1, #+4] LDR R0,[R0, #+4] CMP R0,#+12 // 44 { // 45 case RED_BUTTON:return(1); MOVEQ R0,#+1 BXEQ LR // 46 } // 47 } // 48 return(0); ??MenuKeys2_0: MOV R0,#+0 BX LR ;; return CFI EndBlock cfiBlock3 // 49 } RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock4 Using cfiCommon0 CFI NoFunction THUMB ??find_tegs??rT: BX PC Nop CFI EndBlock cfiBlock4 REQUIRE find_tegs RSEG DATA_C:CONST:SORT:NOROOT(2) // 50 const void * const gui_methods3[11]={ gui_methods3: DATA DC32 OnRedraw3, onCreate2, onClose2, onFocus2, onUnfocus2, MenuKeys2 DC32 0H, kill_data, method, method, 0H // 51 (void *)OnRedraw3, //Redraw // 52 (void *)onCreate2, //Create // 53 (void *)onClose2, //Close // 54 (void *)onFocus2, //Focus // 55 (void *)onUnfocus2, //Unfocus // 56 (void *)MenuKeys2, //OnKey // 57 0, // 58 #ifdef NEWSGOLD // 59 (void *)onDestroy, //Destroy // 60 #else // 61 (void *)kill_data, //Destroy // 62 #endif // 63 (void *)method, // 64 (void *)method, // 65 0 // 66 }; // 67 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock5 Using cfiCommon1 CFI Function find_tegs ARM // 68 void find_tegs() // 69 { find_tegs: PUSH {R4-R6,LR} CFI ?RET Frame(CFA, -4) CFI R6 Frame(CFA, -8) CFI R5 Frame(CFA, -12) CFI R4 Frame(CFA, -16) CFI CFA R13+16 SUB SP,SP,#+172 CFI CFA R13+188 // 70 int f; // 71 char file[128]; // 72 unsigned int err; // 73 FSTATS stat; // 74 f=fopen(media[curentposition].shliah, A_ReadOnly+A_BIN, P_READ, &err); MOV R3,SP MOV R2,#+128 MOV R1,#+32768 LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R4,#+300 LDR R5,??DataTable60 ;; media MLA R0,R4,R0,R5 SWI +10 MOV R4,R0 // 75 GetFileStats(media[curentposition].shliah, &stat, &err); MOV R2,SP ADD R1,SP,#+132 LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R3,#+300 MLA R0,R3,R0,R5 SWI +132 // 76 lseek(f,(stat.size-128), 0, &err, &err); MOV R0,SP PUSH {R0} CFI CFA R13+192 ADD R3,SP,#+4 MOV R2,#+0 LDR R0,[SP, #+140] MVN R1,#+127 ADD R1,R1,R0 MOV R0,R4 SWI +15 // 77 fread(f, file, 128, &err); ADD R3,SP,#+4 MOV R2,#+128 ADD R1,SP,#+8 MOV R0,R4 SWI +11 // 78 fclose(f, &err); ADD R1,SP,#+4 MOV R0,R4 SWI +13 // 79 sprintf(media[curentposition].album,""); ADR R1,??find_tegs_0 ;; "" LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R0,R2,R0,R3 ADD R0,R0,#+240 SWI +22 // 80 sprintf(media[curentposition].track,""); ADR R1,??find_tegs_0 ;; "" MOV R0,#+14 ORR R0,R0,#0x100 LDR R2,??DataTable63 ;; curentposition LDR R2,[R2, #+0] MOV R3,#+300 LDR R4,??DataTable60 ;; media MLA R2,R3,R2,R4 ADD R0,R0,R2 SWI +22 // 81 sprintf(media[curentposition].artist,""); ADR R1,??find_tegs_0 ;; "" LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R0,R2,R0,R3 ADD R0,R0,#+210 SWI +22 // 82 if ((file[0]=='T')&&(file[1]=='A')&&(file[2]=='G')) LDRB R0,[SP, #+8] CMP R0,#+84 ADD SP,SP,#+4 ;; stack cleaning CFI CFA R13+188 LDRBEQ R0,[SP, #+5] CMPEQ R0,#+65 LDRBEQ R0,[SP, #+6] CMPEQ R0,#+71 BNE ??find_tegs_1 // 83 { // 84 int i; // 85 for (i=3;(file[i]!=0)&&(i<33);i++) MOV R4,#+3 ADD R5,SP,#+7 B ??find_tegs_2 // 86 { // 87 sprintf(media[curentposition].track,"%s%c",media[curentposition].track,file[i]); ??find_tegs_3: LDRB R3,[R5], #+1 MOV R0,#+14 ORR R0,R0,#0x100 LDR R1,??DataTable63 ;; curentposition LDR R1,[R1, #+0] MOV R2,#+300 LDR R12,??DataTable60 ;; media MLA R1,R2,R1,R12 ADD R2,R0,R1 LDR R1,??find_tegs_0+0x4 ;; `?` LDR R12,??DataTable63 ;; curentposition LDR R12,[R12, #+0] MOV LR,#+300 LDR R6,??DataTable60 ;; media MLA R6,LR,R12,R6 ADD R0,R0,R6 SWI +22 // 88 } ADD R4,R4,#+1 ??find_tegs_2: LDRB R0,[R5, #+0] CMP R0,#+0 BEQ ??find_tegs_4 CMP R4,#+33 BLT ??find_tegs_3 // 89 for (i=33;(file[i]!=0)&&(i<63);i++) ??find_tegs_4: MOV R4,#+33 ADD R5,SP,#+37 MOV R6,#+300 B ??find_tegs_5 // 90 { // 91 sprintf(media[curentposition].artist,"%s%c",media[curentposition].artist,file[i]); ??find_tegs_6: LDRB R3,[R5], #+1 LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] LDR R2,??DataTable60 ;; media MLA R0,R6,R0,R2 ADD R2,R0,#+210 LDR R1,??find_tegs_0+0x4 ;; `?` LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] LDR R12,??DataTable60 ;; media MLA R0,R6,R0,R12 ADD R0,R0,#+210 SWI +22 // 92 } ADD R4,R4,#+1 ??find_tegs_5: LDRB R0,[R5, #+0] CMP R0,#+0 BEQ ??find_tegs_7 CMP R4,#+63 BLT ??find_tegs_6 // 93 for (i=63;(file[i]!=0)&&(i<93);i++) ??find_tegs_7: MOV R4,#+63 ADD R5,SP,#+67 B ??find_tegs_8 // 94 { // 95 sprintf(media[curentposition].album,"%s%c",media[curentposition].album,file[i]); ??find_tegs_9: LDRB R3,[R5], #+1 LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] LDR R2,??DataTable60 ;; media MLA R0,R6,R0,R2 ADD R2,R0,#+240 LDR R1,??find_tegs_0+0x4 ;; `?` LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] LDR R12,??DataTable60 ;; media MLA R0,R6,R0,R12 ADD R0,R0,#+240 SWI +22 // 96 } ADD R4,R4,#+1 ??find_tegs_8: LDRB R0,[R5, #+0] CMP R0,#+0 BEQ ??find_tegs_1 CMP R4,#+93 BLT ??find_tegs_9 // 97 } // 98 if (strlen(media[curentposition].album)==0){sprintf(media[curentposition].album,"Unknown album");} ??find_tegs_1: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R1,#+300 LDR R2,??DataTable60 ;; media MLA R0,R1,R0,R2 ADD R0,R0,#+240 SWI +27 CMP R0,#+0 BNE ??find_tegs_10 LDR R1,??find_tegs_0+0x8 ;; `?` LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R0,R2,R0,R3 ADD R0,R0,#+240 SWI +22 // 99 if (strlen(media[curentposition].track)==0){sprintf(media[curentposition].track,"Unknown track");} ??find_tegs_10: MOV R0,#+14 ORR R0,R0,#0x100 LDR R1,??DataTable63 ;; curentposition LDR R1,[R1, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R1,R2,R1,R3 ADD R0,R0,R1 SWI +27 CMP R0,#+0 BNE ??find_tegs_11 LDR R1,??find_tegs_0+0xC ;; `?` MOV R0,#+14 ORR R0,R0,#0x100 LDR R2,??DataTable63 ;; curentposition LDR R2,[R2, #+0] MOV R3,#+300 LDR R4,??DataTable60 ;; media MLA R2,R3,R2,R4 ADD R0,R0,R2 SWI +22 // 100 if (strlen(media[curentposition].artist)==0){sprintf(media[curentposition].artist,"Unknown artist");} ??find_tegs_11: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R1,#+300 LDR R2,??DataTable60 ;; media MLA R0,R1,R0,R2 ADD R0,R0,#+210 SWI +27 CMP R0,#+0 BNE ??find_tegs_12 LDR R1,??find_tegs_0+0x10 ;; `?` LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R0,R2,R0,R3 ADD R0,R0,#+210 SWI +22 // 101 } ??find_tegs_12: ADD SP,SP,#+172 ;; stack cleaning CFI CFA R13+16 POP {R4-R6,PC} ;; return DATA ??find_tegs_0: DC8 "",+0,+0,+0 DC32 `?` DC32 `?` DC32 `?` DC32 `?` CFI EndBlock cfiBlock5 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock6 Using cfiCommon0 CFI NoFunction THUMB ??Create??rT: BX PC Nop CFI EndBlock cfiBlock6 REQUIRE Create // 102 RSEG DATA_Z:DATA:SORT:NOROOT(0) // 103 char extension[3]; extension: DS8 3 // 104 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock7 Using cfiCommon1 CFI Function Create ARM // 105 void Create() // 106 { Create: PUSH {R4-R7,LR} CFI ?RET Frame(CFA, -4) CFI R7 Frame(CFA, -8) CFI R6 Frame(CFA, -12) CFI R5 Frame(CFA, -16) CFI R4 Frame(CFA, -20) CFI CFA R13+20 SUB SP,SP,#+1280 CFI CFA R13+1300 // 107 char folder[256]; // 108 sprintf(folder,tosearch); LDR R1,??DataTable69 ;; tosearch ADD R0,SP,#+768 SWI +22 // 109 sprintf(curent_state,LG_SEARCHING_FILES); LDR R1,??Create_0 ;; `?` ADD R0,SP,#+1152 SWI +22 // 115 if (FindFirstFile(&de,path,&err)) MOV R2,SP ADD R1,SP,#+1152 ADD R0,SP,#+8 SWI +107 CMP R0,#+0 BEQ ??Create_1 // 116 { // 117 do // 118 { // 119 sprintf(extension,"%c%c%c",de.file_name[strlen(de.file_name)-3],de.file_name[strlen(de.file_name)-2],de.file_name[strlen(de.file_name)-1]); ??Create_2: ADD R0,SP,#+177 SWI +27 MOV R4,R0 ADD R0,SP,#+177 SWI +27 MOV R5,R0 ADD R0,SP,#+177 SWI +27 ADD R1,SP,#+8 ADD R1,R4,R1 LDRB R1,[R1, #+168] PUSH {R1} CFI CFA R13+1304 ADD R1,SP,#+12 ADD R1,R5,R1 LDRB R3,[R1, #+167] ADD R1,SP,#+12 ADD R0,R0,R1 LDRB R2,[R0, #+166] LDR R1,??Create_0+0x8 ;; `?` LDR R0,??Create_0+0xC ;; extension SWI +22 // 120 char temp[128]; // 121 sprintf(temp,"%s\\%s",folder,de.file_name); ADD R3,SP,#+181 ADD R2,SP,#+772 LDR R1,??Create_0+0x10 ;; `?` ADD R0,SP,#+4 ADD R0,R0,#+1024 SWI +22 // 122 if (!IsFile(de.file_name)) ADD R0,SP,#+181 _BLF IsFile,??IsFile??rA CMP R0,#+0 ADD SP,SP,#+4 ;; stack cleaning CFI CFA R13+1300 BNE ??Create_3 // 123 { // 124 sprintf(tosearch,temp); ADD R1,SP,#+1024 LDR R0,??DataTable69 ;; tosearch SWI +22 // 125 Create(); BL Create B ??Create_4 // 126 } // 127 else // 128 if (!strcmp_nocase(extension,"mp3")) ??Create_3: ADR R1,??Create_5 ;; "mp3" LDR R0,??Create_0+0xC ;; extension _BLF strcmp_nocase,??strcmp_nocase??rA CMP R0,#+0 BNE ??Create_4 // 129 { // 130 sprintf(media[curentposition].shliah,temp); ADD R1,SP,#+1024 LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] MOV R2,#+300 LDR R3,??DataTable60 ;; media MLA R0,R2,R0,R3 SWI +22 // 131 find_tegs(); BL find_tegs // 132 sprintf(curent_state,LG_READING_TAGS); LDR R1,??Create_0+0x14 ;; `?0) ??Create_8: ADD R1,R7,#+210 ADD R0,R5,#+210 SWI +25 CMP R0,#+1 BLT ??Create_9 // 154 { // 155 sprintf(name,media[i].artist); ADD R1,R5,#+210 ADD R0,SP,#+448 SWI +22 // 156 sprintf(media[i].artist,media[j].artist); ADD R1,R7,#+210 ADD R0,R5,#+210 SWI +22 // 157 sprintf(media[j].artist,name); ADD R1,SP,#+448 ADD R0,R7,#+210 SWI +22 // 158 // 159 sprintf(name,media[i].track); MOV R0,#+14 ORR R0,R0,#0x100 ADD R1,R0,R5 ADD R0,SP,#+448 SWI +22 // 160 sprintf(media[i].track,media[j].track); MOV R0,#+14 ORR R0,R0,#0x100 ADD R1,R0,R7 ADD R0,R0,R5 SWI +22 // 161 sprintf(media[j].track,name); ADD R1,SP,#+448 MOV R0,#+14 ORR R0,R0,#0x100 ADD R0,R0,R7 SWI +22 // 162 // 163 sprintf(name,media[i].album); ADD R1,R5,#+240 ADD R0,SP,#+448 SWI +22 // 164 sprintf(media[i].album,media[j].album); ADD R1,R7,#+240 ADD R0,R5,#+240 SWI +22 // 165 sprintf(media[j].album,name); ADD R1,SP,#+448 ADD R0,R7,#+240 SWI +22 // 166 // 167 sprintf(name,media[i].shliah); MOV R1,R5 ADD R0,SP,#+448 SWI +22 // 168 sprintf(media[i].shliah,media[j].shliah); MOV R1,R7 MOV R0,R5 SWI +22 // 169 sprintf(media[j].shliah,name); ADD R1,SP,#+448 MOV R0,R7 SWI +22 // 170 } // 171 } ??Create_9: ADD R6,R6,#+1 ADD R7,R7,#+300 ??Create_10: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] CMP R6,R0 BLT ??Create_8 ADD R4,R4,#+1 ADD R5,R5,#+300 ??Create_7: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] ADD R0,R0,#+1 CMP R4,R0 BGE ??Create_11 ADD R6,R4,#+1 MOV R0,#+300 LDR R1,??DataTable60 ;; media MLA R7,R0,R6,R1 B ??Create_10 // 172 } // 173 // 174 for (int i=0;i0)) ??Create_13: ADD R1,R7,#+210 ADD R0,R5,#+210 SWI +25 CMP R0,#+0 BNE ??Create_14 ADD R1,R7,#+240 ADD R0,R5,#+240 SWI +25 CMP R0,#+1 BLT ??Create_14 // 179 { // 180 sprintf(name,media[i].artist); ADD R1,R5,#+210 ADD R0,SP,#+448 SWI +22 // 181 sprintf(media[i].artist,media[j].artist); ADD R1,R7,#+210 ADD R0,R5,#+210 SWI +22 // 182 sprintf(media[j].artist,name); ADD R1,SP,#+448 ADD R0,R7,#+210 SWI +22 // 183 // 184 sprintf(name,media[i].track); MOV R0,#+14 ORR R0,R0,#0x100 ADD R1,R0,R5 ADD R0,SP,#+448 SWI +22 // 185 sprintf(media[i].track,media[j].track); MOV R0,#+14 ORR R0,R0,#0x100 ADD R1,R0,R7 ADD R0,R0,R5 SWI +22 // 186 sprintf(media[j].track,name); ADD R1,SP,#+448 MOV R0,#+14 ORR R0,R0,#0x100 ADD R0,R0,R7 SWI +22 // 187 // 188 sprintf(name,media[i].album); ADD R1,R5,#+240 ADD R0,SP,#+448 SWI +22 // 189 sprintf(media[i].album,media[j].album); ADD R1,R7,#+240 ADD R0,R5,#+240 SWI +22 // 190 sprintf(media[j].album,name); ADD R1,SP,#+448 ADD R0,R7,#+240 SWI +22 // 191 // 192 sprintf(name,media[i].shliah); MOV R1,R5 ADD R0,SP,#+448 SWI +22 // 193 sprintf(media[i].shliah,media[j].shliah); MOV R1,R7 MOV R0,R5 SWI +22 // 194 sprintf(media[j].shliah,name); ADD R1,SP,#+448 MOV R0,R7 SWI +22 // 195 } // 196 } ??Create_14: ADD R6,R6,#+1 ADD R7,R7,#+300 ??Create_15: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] CMP R6,R0 BLT ??Create_13 ADD R4,R4,#+1 ADD R5,R5,#+300 ??Create_12: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] ADD R0,R0,#+1 CMP R4,R0 BGE ??Create_16 ADD R6,R4,#+1 MOV R0,#+300 LDR R1,??DataTable60 ;; media MLA R7,R0,R6,R1 B ??Create_15 // 197 } // 198 int f; // 199 unsigned int err; // 200 sprintf(curent_state,LG_SAVING); ??Create_16: LDR R1,??Create_0+0x24 ;; `?` ADD R0,SP,#+448 SWI +22 // 202 f=fopen(name, A_WriteOnly+A_Create, P_WRITE, & err ); ADD R3,SP,#+4 MOV R2,#+256 ORR R1,R2,#0x1 ADD R0,SP,#+448 SWI +10 MOV R4,R0 // 203 WSHDR* a=AllocWS(256); MOV R0,#+256 SWI +293 MOV R5,R0 // 204 for (int i=0;i` ADD R0,SP,#+456 SWI +22 // 209 //utf8_2ws(a,name,256); // 210 //ws_2str(a,name,256); // 211 fwrite(f,name,strlen(name),&err); ADD R0,SP,#+456 SWI +27 ADD R3,SP,#+12 MOV R2,R0 ADD R1,SP,#+456 MOV R0,R4 SWI +12 // 212 } ADD R6,R6,#+1 ADD R7,R7,#+300 ADD SP,SP,#+8 ;; stack cleaning CFI CFA R13+1300 ??Create_17: LDR R0,??DataTable63 ;; curentposition LDR R0,[R0, #+0] CMP R6,R0 BLT ??Create_18 // 213 FreeWS(a); MOV R0,R5 SWI +297 // 214 fclose(f,&err); ADD R1,SP,#+4 MOV R0,R4 SWI +13 // 215 } // 216 GeneralFunc_flag1(GUI_GUI,1); MOV R1,#+1 LDR R0,??DataTable67 ;; GUI_GUI LDR R0,[R0, #+0] SWI +317 // 217 ViewFiles(); _BLF ViewFiles,??ViewFiles??rA // 218 } // 219 } ??Create_6: ADD SP,SP,#+1280 ;; stack cleaning CFI CFA R13+20 POP {R4-R7,PC} ;; return DATA ??Create_0: DC32 `?` DC32 `?` DC32 extension DC32 `?` DC32 `?` CFI EndBlock cfiBlock7 RSEG CODE:CODE:NOROOT(2) DATA ??DataTable60: DC32 media RSEG CODE:CODE:NOROOT(2) DATA ??DataTable62: DC32 search_state RSEG CODE:CODE:NOROOT(2) DATA ??DataTable63: DC32 curentposition RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock8 Using cfiCommon0 CFI NoFunction THUMB ??CreateBaseOfMediafiles??rT: BX PC Nop CFI EndBlock cfiBlock8 REQUIRE CreateBaseOfMediafiles // 220 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock9 Using cfiCommon1 CFI Function CreateBaseOfMediafiles ARM // 221 int CreateBaseOfMediafiles() // 222 { CreateBaseOfMediafiles: PUSH {R4,LR} CFI ?RET Frame(CFA, -4) CFI R4 Frame(CFA, -8) CFI CFA R13+8 SUB SP,SP,#+764 CFI CFA R13+772 // 223 DIR_ENTRY de; // 224 unsigned int err; // 225 char name[320]; // 226 sprintf(name,"%smediafiiles.txt",playerfolder); LDR R2,??DataTable65 ;; playerfolder LDR R1,??DataTable66 ;; `?` ADD R0,SP,#+444 SWI +22 // 227 if(!FindFirstFile(&de,name,&err)) MOV R2,SP ADD R1,SP,#+444 ADD R0,SP,#+4 SWI +107 CMP R0,#+0 BNE ??CreateBaseOfMediafiles_0 // 228 { // 229 MAIN_GUI *main_gui=malloc(sizeof(MAIN_GUI)); MOV R0,#+60 SWI +20 MOV R4,R0 // 230 zeromem(main_gui,sizeof(MAIN_GUI)); MOV R1,#+60 SWI +285 // 231 main_gui->gui.canvas=(void *)(&Canvas2); LDR R0,??CreateBaseOfMediafiles_1 ;; Canvas2 STR R0,[R4, #+0] // 232 main_gui->gui.flag30=2; MOV R0,#+2 STR R0,[R4, #+44] // 233 main_gui->gui.methods=(void *)gui_methods3; LDR R0,??CreateBaseOfMediafiles_1+0x4 ;; gui_methods3 STR R0,[R4, #+4] // 234 main_gui->gui.item_ll.data_mfree=(void (*)(void *))mfree_adr(); SWI +32789 STR R0,[R4, #+28] // 235 GUI_GUI=CreateGUI(main_gui); MOV R0,R4 SWI +311 LDR R1,??DataTable67 ;; GUI_GUI STR R0,[R1, #+0] // 236 sprintf(tosearch,chotyry); LDR R0,??DataTable68 ;; chotyry LDR R1,[R0, #+0] LDR R0,??DataTable69 ;; tosearch SWI +22 // 237 sprintf(curent_state,LG_SEARCHING); LDR R1,??CreateBaseOfMediafiles_1+0x8 ;; `?` RSEG CODE:CODE:NOROOT(2) DATA ??DataTable67: DC32 GUI_GUI RSEG CODE:CODE:NOROOT(2) DATA ??DataTable68: DC32 chotyry RSEG CODE:CODE:NOROOT(2) DATA ??DataTable69: DC32 tosearch RSEG CODE:CODE:NOROOT(2) DATA ??DataTable70: DC32 curent_state RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock10 Using cfiCommon1 CFI NoFunction ARM ??GetFon??rA: LDR R12,??Subroutine5_0 ;; GetFon BX R12 DATA ??Subroutine5_0: DC32 GetFon CFI EndBlock cfiBlock10 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock11 Using cfiCommon1 CFI NoFunction ARM ??GetKatalogfontcolour??rA: LDR R12,??Subroutine6_0 ;; GetKatalogfontcolour BX R12 DATA ??Subroutine6_0: DC32 GetKatalogfontcolour CFI EndBlock cfiBlock11 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock12 Using cfiCommon1 CFI NoFunction ARM ??IsFile??rA: LDR R12,??Subroutine7_0 ;; IsFile BX R12 DATA ??Subroutine7_0: DC32 IsFile CFI EndBlock cfiBlock12 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock13 Using cfiCommon1 CFI NoFunction ARM ??strcmp_nocase??rA: LDR R12,??Subroutine8_0 ;; strcmp_nocase BX R12 DATA ??Subroutine8_0: DC32 strcmp_nocase CFI EndBlock cfiBlock13 RSEG CODE:CODE:NOROOT(2) CFI Block cfiBlock14 Using cfiCommon1 CFI NoFunction ARM ??ViewFiles??rA: LDR R12,??Subroutine9_0 ;; ViewFiles BX R12 DATA ??Subroutine9_0: DC32 ViewFiles CFI EndBlock cfiBlock14 RSEG DATA_ID:CONST:SORT:NOROOT(2) `?`: DATA DC32 `?` RSEG INITTAB:CODE:ROOT(2) DATA ?init?tab?DATA_Z: DCD sfe(DATA_Z) - sfb(DATA_Z), sfb(DATA_Z), sfb(DATA_Z) RSEG DATA_ID:CONST:SORT:NOROOT(2) `?*?DATA_ID`: RSEG INITTAB:CODE:ROOT(2) DATA ?init?tab?DATA_I: DCD sfe(DATA_I) - sfb(DATA_I), sfb(DATA_I), sfb(DATA_ID) END // // 2 788 bytes in segment CODE // 352 bytes in segment DATA_C // 4 bytes in segment DATA_I // 4 bytes in segment DATA_ID // 855 bytes in segment DATA_Z // 24 bytes in segment INITTAB // // 2 708 bytes of CODE memory (+ 104 bytes shared) // 356 bytes of CONST memory // 859 bytes of DATA memory // //Errors: none //Warnings: none