##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.40A/W32 EVALUATION    28/Mar/2008  19:07:08 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  E:\Ivo\arm\IVOPLAY\SPYSOK.C                          #
#    Command line    =  E:\Ivo\arm\IVOPLAY\SPYSOK.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\SPYSOK.lst           #
#    Object file     =  E:\Ivo\arm\IVOPLAY\Release\Obj\SPYSOK.r79            #
#                                                                            #
#                                                                            #
##############################################################################

E:\Ivo\arm\IVOPLAY\SPYSOK.C
      1          #include "../inc/swilib.h"
      2          #include "medialibrary.h"
      3          #include "language.h"
      4          #include "main.h"

   \                                 In segment DATA_C, align 1, align-sorted
   \   static char const __data pt[3]
   \                     pt:
   \   00000000   257400             DC8 "%t"
      5          #include "conf_loader.h"
      6          
      7          extern const char folder[128];

   \                                 In segment DATA_C, align 4, align-sorted
      8          const char my_ipc_name[32]="Ivoplay";
   \                     my_ipc_name:
   \   00000000   49766F706C61       DC8 "Ivoplay"
   \              7900        
   \   00000008   000000000000       DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   \              000000000000
   \              00000000    
   \   00000018   000000000000       DC8 0, 0, 0, 0, 0, 0, 0, 0
   \              0000        

   \                                 In segment CODE, align 4, keep-with-next
      9          void CreateMEDIALibrary()
     10          {
   \                     CreateMEDIALibrary:
   \   00000000   00402DE9           PUSH     {LR}
   \   00000004   80D04DE2           SUB      SP,SP,#+128
     11            char t[128];
     12            sprintf(t,folder);
   \   00000008   ........           LDR      R1,??DataTable1  ;; folder
   \   0000000C   0D00A0E1           MOV      R0,SP
   \   00000010   160000EF           SWI      +22
     13            CreateMediaLibrary(t);
   \   00000014   0D00A0E1           MOV      R0,SP
   \   00000018   ........           _BLF     CreateMediaLibrary,??CreateMediaLibrary??rA
     14          }
   \   0000001C   80D08DE2           ADD      SP,SP,#+128      ;; stack cleaning
   \   00000020   0080BDE8           POP      {PC}             ;; return
     15          

   \                                 In segment CODE, align 4, keep-with-next
     16          void PerevirkaVidpovidnosti()
     17          {
   \                     PerevirkaVidpovidnosti:
   \   00000000   00402DE9           PUSH     {LR}
   \   00000004   80D04DE2           SUB      SP,SP,#+128
     18            char t[128];
     19            sprintf(t,folder);
   \   00000008   ........           LDR      R1,??DataTable1  ;; folder
   \   0000000C   0D00A0E1           MOV      R0,SP
   \   00000010   160000EF           SWI      +22
     20            BEER(t);
   \   00000014   0D00A0E1           MOV      R0,SP
   \   00000018   ........           _BLF     BEER,??BEER??rA
     21          }
   \   0000001C   80D08DE2           ADD      SP,SP,#+128      ;; stack cleaning
   \   00000020   0080BDE8           POP      {PC}             ;; return
     22          
     23          
     24          

   \                                 In segment DATA_Z, align 4, align-sorted
     25          CSM_RAM *data_library;
   \                     data_library:
   \   00000000                      DS8 4

   \                                 In segment DATA_Z, align 4, align-sorted
     26          int LibraryMenu_ID;
   \                     LibraryMenu_ID:
   \   00000000                      DS8 4
     27          

   \                                 In segment DATA_I, align 4, align-sorted
     28          int icon_create[] = {(int)"0:\\1.png",0};
   \                     icon_create:
   \   00000000                      DS8 8
   \   00000008                      REQUIRE `?<Initializer for icon_create>`

   \                                 In segment DATA_I, align 4, align-sorted
     29          int icon_gy[] = {(int)"0:\\2.png",0};
   \                     icon_gy:
   \   00000000                      DS8 8
   \   00000008                      REQUIRE `?<Initializer for icon_gy>`
     30          //int icon3[] = {(int)"0:\\3.png",0};
     31          
     32          
     33          #define NUMITEMS 2
     34          

   \                                 In segment CODE, align 4, keep-with-next
     35          static void patch_header(const HEADER_DESC* head)
     36          {
   \                     patch_header:
   \   00000000   10402DE9           PUSH     {R4,LR}
   \   00000004   0040A0E1           MOV      R4,R0
     37            ((HEADER_DESC*)head)->rc.x=0;
   \   00000008   0000A0E3           MOV      R0,#+0
   \   0000000C   B000C4E1           STRH     R0,[R4, #+0]
     38            ((HEADER_DESC*)head)->rc.y=YDISP;
   \   00000010   B200C4E1           STRH     R0,[R4, #+2]
     39            ((HEADER_DESC*)head)->rc.x2=ScreenW()-1;
   \   00000014   888100EF           SWI      +33160
   \   00000018   010040E2           SUB      R0,R0,#+1
   \   0000001C   B400C4E1           STRH     R0,[R4, #+4]
     40            ((HEADER_DESC*)head)->rc.y2=HeaderH()-1+YDISP;
   \   00000020   8A8100EF           SWI      +33162
   \   00000024   010040E2           SUB      R0,R0,#+1
   \   00000028   B600C4E1           STRH     R0,[R4, #+6]
     41          }
   \   0000002C   1080BDE8           POP      {R4,PC}          ;; return
     42          
     43          
     44          

   \                                 In segment DATA_C, align 4, align-sorted
     45          static const HEADER_DESC menuhdr={0,0,0,0,NULL,(int)LG_MEDIALIBRARY,LGP_NULL};
   \                     menuhdr:
   \   00000000   000000000000       DC16 0, 0, 0, 0
   \              0000        
   \   00000008   00000000....       DC32 0H, `?<Constant "\\314\\345\\344i\\340\\362\\345\\352\\340"`
   \              ....        
   \   00000010   FF7F0000           DC32 32767
     46          

   \                                 In segment DATA_C, align 4, align-sorted
     47          static const int mmenusoftkeys[]={0,1,2};
   \                     mmenusoftkeys:
   \   00000000   000000000100       DC32 0, 1, 2
   \              000002000000
     48          

   \                                 In segment DATA_C, align 4, align-sorted
     49          static const char * const menutexts[NUMITEMS]=
   \                     menutexts:
   \   00000000   ........           DC32 `?<Constant "\\321\\362\\342\\356\\360\\350\\362\\350">`
   \   00000004   ........           DC32 `?<Constant "\\317\\345\\360\\345\\342i\\360\\350\\362\\`
     50          {
     51            LG_CREATE_MEDIALIBRARY,
     52            LG_PEREVIRYTY,
     53            //"أو",
     54          };
     55          

   \                                 In segment DATA_I, align 4, align-sorted
     56          static const void *menuprocs[NUMITEMS]=
   \                     menuprocs:
   \   00000000                      DS8 8
   \   00000008                      REQUIRE `?<Initializer for menuprocs>`
     57          {
     58            (void *)CreateMEDIALibrary,
     59            (void *)PerevirkaVidpovidnosti,
     60            //(void *)CreateRemotePlayerControler,
     61          };
     62          

   \                                 In segment DATA_C, align 4, align-sorted
     63          static const SOFTKEY_DESC mmenu_sk[]=
   \                     mmenu_sk:
   \   00000000   18000000           DC16 24, 0
   \   00000004   ........           DC32 `?<Constant "\\302\\350\\341i\\360">`
   \   00000008   01000000           DC16 1, 0
   \   0000000C   ........           DC32 `?<Constant "\\315\\340\\347\\340\\344">`
   \   00000010   3D000000           DC16 61, 0
   \   00000014   FBC0FF7F           DC32 2147467515
     64          {
     65            {0x0018,0x0000,(int)LG_SELECT},
     66            {0x0001,0x0000,(int)LG_CLOSE},
     67            {0x003D,0x0000,(int)LGP_DOIT_PIC}
     68          };
     69          

   \                                 In segment DATA_C, align 4, align-sorted
     70          static const SOFTKEYSTAB mmenu_skt=
   \                     mmenu_skt:
   \   00000000   ........0000       DC32 mmenu_sk, 0
   \              0000        
     71          {
     72            mmenu_sk,0
     73          };
     74          

   \                                 In segment CODE, align 4, keep-with-next
     75          void tmenu_ghook_library(void *data_library, int cmd)
     76          {
   \                     tmenu_ghook_library:
   \   00000000   00402DE9           PUSH     {LR}
     77            //PNGTOP_DESC *pltop=PNG_TOP();
     78            if (cmd==9)
     79            {
     80              //pltop->dyn_pltop=NULL;
     81            }
     82            if (cmd==0x0A)
   \   00000004   0A0051E3           CMP      R1,#+10
   \   00000008   0080BD18           POPNE    {PC}
     83            {
     84              //pltop->dyn_pltop=XStatusesImgList;
     85              DisableIDLETMR();
   \   0000000C   7F0100EF           SWI      +383
     86            }
     87          }
   \   00000010   0080BDE8           POP      {PC}             ;; return
     88          //static int icon_array[2];
     89          

   \                                 In segment CODE, align 4, keep-with-next
     90          static void menuitemhandler(void *data_library, int curitem, void *unk)
     91          {
   \                     menuitemhandler:
   \   00000000   F0402DE9           PUSH     {R4-R7,LR}
   \   00000004   0040A0E1           MOV      R4,R0
   \   00000008   0150A0E1           MOV      R5,R1
     92            WSHDR *ws;
     93            void *item=AllocMenuItem(data_library);
   \   0000000C   970100EF           SWI      +407
   \   00000010   0060A0E1           MOV      R6,R0
     94            ws=AllocMenuWS(data_library,strlen(menutexts[curitem]));
   \   00000014   6C009FE5           LDR      R0,??menuitemhandler_0  ;; menutexts
   \   00000018   050190E7           LDR      R0,[R0, +R5, LSL #+2]
   \   0000001C   1B0000EF           SWI      +27
   \   00000020   0010A0E1           MOV      R1,R0
   \   00000024   0400A0E1           MOV      R0,R4
   \   00000028   980100EF           SWI      +408
   \   0000002C   0070A0E1           MOV      R7,R0
     95            wsprintf(ws,pt,menutexts[curitem]);
   \   00000030   50009FE5           LDR      R0,??menuitemhandler_0  ;; menutexts
   \   00000034   052190E7           LDR      R2,[R0, +R5, LSL #+2]
   \   00000038   4C109FE5           LDR      R1,??menuitemhandler_0+0x4  ;; pt
   \   0000003C   0700A0E1           MOV      R0,R7
   \   00000040   240100EF           SWI      +292
     96            switch(curitem)
   \   00000044   0500B0E1           MOVS     R0,R5
   \   00000048   0200000A           BEQ      ??menuitemhandler_1
   \   0000004C   010055E2           SUBS     R0,R5,#+1
   \   00000050   0200000A           BEQ      ??menuitemhandler_2
   \   00000054   050000EA           B        ??menuitemhandler_3
     97            {
     98              case 0:
     99              SetMenuItemIconArray(data_library,item,icon_create);
   \                     ??menuitemhandler_1:
   \   00000058   30209FE5           LDR      R2,??menuitemhandler_0+0x8  ;; icon_create
   \   0000005C   000000EA           B        ??menuitemhandler_4
    100              break;
    101              case 1:
    102              SetMenuItemIconArray(data_library,item,icon_gy);
   \                     ??menuitemhandler_2:
   \   00000060   2C209FE5           LDR      R2,??menuitemhandler_0+0xC  ;; icon_gy
   \                     ??menuitemhandler_4:
   \   00000064   0610A0E1           MOV      R1,R6
   \   00000068   0400A0E1           MOV      R0,R4
   \   0000006C   990100EF           SWI      +409
    103              break;
    104              /*case 2:
    105              SetMenuItemIconArray(data_library,item,icon3);
    106              break;*/
    107            }
    108            SetMenuItemText(data_library, item, ws, curitem);
   \                     ??menuitemhandler_3:
   \   00000070   0530A0E1           MOV      R3,R5
   \   00000074   0720A0E1           MOV      R2,R7
   \   00000078   0610A0E1           MOV      R1,R6
   \   0000007C   0400A0E1           MOV      R0,R4
   \   00000080   9A0100EF           SWI      +410
    109          }
   \   00000084   F080BDE8           POP      {R4-R7,PC}       ;; return
   \                     ??menuitemhandler_0:
   \   00000088   ........           DC32     menutexts
   \   0000008C   ........           DC32     pt
   \   00000090   ........           DC32     icon_create
   \   00000094   ........           DC32     icon_gy
    110          

   \                                 In segment CODE, align 4, keep-with-next
    111          static int tmenu_keyhook(void *data_library, GUI_MSG *msg)
    112          {
   \                     tmenu_keyhook:
   \   00000000   00402DE9           PUSH     {LR}
    113            if ((msg->keys==0x18)||(msg->keys==0x3D))
   \   00000004   F220D1E1           LDRSH    R2,[R1, #+2]
   \   00000008   180052E3           CMP      R2,#+24
   \   0000000C   3D005213           CMPNE    R2,#+61
   \   00000010   0300001A           BNE      ??tmenu_keyhook_0
    114            {
    115              ((void (*)(void))(menuprocs[GetCurMenuItem(data_library)]))();
   \   00000014   8F0100EF           SWI      +399
   \   00000018   0C109FE5           LDR      R1,??tmenu_keyhook_1  ;; menuprocs
   \   0000001C   000191E7           LDR      R0,[R1, +R0, LSL #+2]
   \   00000020   30FF2FE1           BLX      R0
    116            }
    117            return(0);
   \                     ??tmenu_keyhook_0:
   \   00000024   0000A0E3           MOV      R0,#+0
   \   00000028   0080BDE8           POP      {PC}             ;; return
   \                     ??tmenu_keyhook_1:
   \   0000002C   ........           DC32     menuprocs
    118          }
    119          
    120          

   \                                 In segment DATA_C, align 4, align-sorted
    121          static const MENU_DESC tmenu=
   \                     tmenu:
   \   00000000   08000000....       DC32 8, tmenu_keyhook, tmenu_ghook_library, 0H, mmenusoftkeys
   \              ............
   \              00000000....
   \              ....        
   \   00000014   ........1100       DC32 mmenu_skt, 17, menuitemhandler, 0H, 0H, 2
   \              0000........
   \              000000000000
   \              000002000000
    122          {
    123            8,tmenu_keyhook,tmenu_ghook_library,NULL,
    124            mmenusoftkeys,
    125            &mmenu_skt,
    126            0x11,//MENU_FLAG,
    127            menuitemhandler,
    128            NULL,//menuitems,
    129            NULL,//menuprocs,
    130            NUMITEMS
    131          };
    132          

   \                                 In segment CODE, align 4, keep-with-next
    133          void CreateMenuLibrary()
    134          {
   \                     CreateMenuLibrary:
   \   00000000   00402DE9           PUSH     {LR}
    135            patch_header(&menuhdr);
   \   00000004   3C009FE5           LDR      R0,??CreateMenuLibrary_0  ;; menuhdr
   \   00000008   ........           BL       patch_header
    136            LibraryMenu_ID=CreateMenu(0,0,&tmenu,&menuhdr,0,NUMITEMS,0,0);
   \   0000000C   0000A0E3           MOV      R0,#+0
   \   00000010   01002DE9           PUSH     {R0}
   \   00000014   01002DE9           PUSH     {R0}
   \   00000018   0200A0E3           MOV      R0,#+2
   \   0000001C   01002DE9           PUSH     {R0}
   \   00000020   0000A0E3           MOV      R0,#+0
   \   00000024   01002DE9           PUSH     {R0}
   \   00000028   18309FE5           LDR      R3,??CreateMenuLibrary_0  ;; menuhdr
   \   0000002C   18209FE5           LDR      R2,??CreateMenuLibrary_0+0x4  ;; tmenu
   \   00000030   0010A0E3           MOV      R1,#+0
   \   00000034   520100EF           SWI      +338
   \   00000038   10109FE5           LDR      R1,??CreateMenuLibrary_0+0x8  ;; LibraryMenu_ID
   \   0000003C   000081E5           STR      R0,[R1, #+0]
    137          }
   \   00000040   10D08DE2           ADD      SP,SP,#+16       ;; stack cleaning
   \   00000044   0080BDE8           POP      {PC}             ;; return
   \                     ??CreateMenuLibrary_0:
   \   00000048   ........           DC32     menuhdr
   \   0000004C   ........           DC32     tmenu
   \   00000050   ........           DC32     LibraryMenu_ID

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable1:
   \   00000000   ........           DC32     folder

   \                                 In segment DATA_ID, align 4, align-sorted
   \                     `?<Initializer for icon_create>`:
   \   00000000   ........0000       DC32 `?<Constant "0:\\\\1.png">`, 0
   \              0000        

   \                                 In segment DATA_ID, align 4, align-sorted
   \                     `?<Initializer for icon_gy>`:
   \   00000000   ........0000       DC32 `?<Constant "0:\\\\2.png">`, 0
   \              0000        

   \                                 In segment DATA_ID, align 4, align-sorted
   \                     `?<Initializer for menuprocs>`:
   \   00000000   ............       DC32 CreateMEDIALibrary, PerevirkaVidpovidnosti
   \              ....        

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "0:\\\\1.png">`:
   \   00000000   303A5C312E70       DC8 "0:\\1.png"
   \              6E6700      
   \   00000009   000000             DC8 0, 0, 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "0:\\\\2.png">`:
   \   00000000   303A5C322E70       DC8 "0:\\2.png"
   \              6E6700      
   \   00000009   000000             DC8 0, 0, 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "\\314\\345\\344i\\340\\362\\345\\352\\340"`:
   \   00000000   CCE5E469E0F2       DC8 "\314\345\344i\340\362\345\352\340"
   \              E5EAE000    
   \   0000000A   0000               DC8 0, 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "\\321\\362\\342\\356\\360\\350\\362\\350">`:
   \   00000000   D1F2E2EEF0E8       DC8 "\321\362\342\356\360\350\362\350"
   \              F2E800      
   \   00000009   000000             DC8 0, 0, 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "\\317\\345\\360\\345\\342i\\360\\350\\362\\`:
   \   00000000   CFE5F0E5E269       DC8 "\317\345\360\345\342i\360\350\362\350"
   \              F0E8F2E800  
   \   0000000B   00                 DC8 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "\\302\\350\\341i\\360">`:
   \   00000000   C2E8E169F000       DC8 "\302\350\341i\360"
   \   00000006   0000               DC8 0, 0

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "\\315\\340\\347\\340\\344">`:
   \   00000000   CDE0E7E0E400       DC8 "\315\340\347\340\344"
   \   00000006   0000               DC8 0, 0

   Maximum stack usage in bytes:

     Function               CSTACK
     --------               ------
     CreateMEDIALibrary       132
     CreateMenuLibrary         20
     PerevirkaVidpovidnosti   132
     menuitemhandler           20
     patch_header               8
     tmenu_ghook_library        4
     tmenu_keyhook              4


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     pt                                3
     my_ipc_name                      32
     CreateMEDIALibrary               36
     PerevirkaVidpovidnosti           36
     data_library                      4
     LibraryMenu_ID                    4
     icon_create                       8
     icon_gy                           8
     patch_header                     48
     menuhdr                          20
     mmenusoftkeys                    12
     menutexts                         8
     menuprocs                         8
     mmenu_sk                         24
     mmenu_skt                         8
     tmenu_ghook_library              20
     menuitemhandler                 152
     tmenu_keyhook                    48
     tmenu                            44
     CreateMenuLibrary                84
     ??DataTable1                      4
     ?<Initializer for icon_create>    8
     ?<Initializer for icon_gy>        8
     ?<Initializer for menuprocs>      8
     ?<Constant "0:\\1.png">          12
     ?<Constant "0:\\2.png">          12
     ?<Constant "\314\345\344i\340\362\345\352\340"
                                      12
     ?<Constant "\321\362\342\356\360\350\362\350">
                                      12
     ?<Constant "\317\345\360\345\342i\360\350\362\
                                      12
     ?<Constant "\302\350\341i\360">
                                       8
     ?<Constant "\315\340\347\340\344">
                                       8
      Others                          76

 
 480 bytes in segment CODE
 227 bytes in segment DATA_C
  24 bytes in segment DATA_I
  24 bytes in segment DATA_ID
   8 bytes in segment DATA_Z
  24 bytes in segment INITTAB
 
 428 bytes of CODE  memory (+ 76 bytes shared)
 251 bytes of CONST memory
  32 bytes of DATA  memory

Errors: none
Warnings: none
