//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.42A/W32 EVALUATION   29/Oct/2008  03:34:21 /
// Copyright 1999-2005 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  interwork                                           /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  D:\Pasha\elf\_MY_PROJECT_\NRSS\strings.c            /
//    Command line    =  D:\Pasha\elf\_MY_PROJECT_\NRSS\strings.c -D         /
//                       NEWSGOLD -D ELKA -lCN D:\Pasha\elf\_MY_PROJECT_\NRS /
//                       S\Release_ELKA\List\ -la                            /
//                       D:\Pasha\elf\_MY_PROJECT_\NRSS\Release_ELKA\List\   /
//                       -o D:\Pasha\elf\_MY_PROJECT_\NRSS\Release_ELKA\Obj\ /
//                        -s9 --no_unroll --cpu_mode arm --endian little     /
//                       --cpu ARM926EJ-S --stack_align 4 --interwork -e     /
//                       --fpu None --dlib_config "D:\Pasha\Embedded         /
//                       Workbench 4.0 Evaluation2\ARM\LIB\dl5tpainl8n.h"    /
//                       -I "D:\Pasha\Embedded Workbench 4.0                 /
//                       Evaluation2\ARM\INC\" --inline_threshold=2          /
//    List file       =  D:\Pasha\elf\_MY_PROJECT_\NRSS\Release_ELKA\List\st /
//                       rings.s79                                           /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME strings

        RTMODEL "StackAlign4", "USED"
        RTMODEL "__cpu_mode", "__pcs__interwork"
        RTMODEL "__data_model", "absolute"
        RTMODEL "__endian", "little"
        RTMODEL "__rt_version", "6"

        RSEG CSTACK:DATA:NOROOT(2)

        MULTWEAK ??MakeGlobalString??rT
        MULTWEAK ??ascii2ws??rT
        MULTWEAK ??char16to8??rT
        MULTWEAK ??char8to16??rT
        MULTWEAK ??strcmp_nocase??rT
        PUBLIC MakeGlobalString
        FUNCTION MakeGlobalString,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC ascii2ws
        FUNCTION ascii2ws,0203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC char16to8
        FUNCTION char16to8,0203H
        PUBLIC char8to16
        FUNCTION char8to16,0203H
        PUBLIC strcmp_nocase
        FUNCTION strcmp_nocase,0203H
        PUBLIC unicode2char
        PUBLIC win2unicode
        
        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
        
MakeGlobalString    SYMBOL "MakeGlobalString"
??MakeGlobalString??rT SYMBOL "??rT", MakeGlobalString
ascii2ws            SYMBOL "ascii2ws"
??ascii2ws??rT      SYMBOL "??rT", ascii2ws
char16to8           SYMBOL "char16to8"
??char16to8??rT     SYMBOL "??rT", char16to8
char8to16           SYMBOL "char8to16"
??char8to16??rT     SYMBOL "??rT", char8to16
strcmp_nocase       SYMBOL "strcmp_nocase"
??strcmp_nocase??rT SYMBOL "??rT", strcmp_nocase


        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI NoFunction
        THUMB
??MakeGlobalString??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock0
        REQUIRE MakeGlobalString

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon1
        CFI Function MakeGlobalString
        ARM
MakeGlobalString:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
        MOV      R4,R0
        MOV      R5,R1
        MOV      R6,R2
        SWI      +27
        MOV      R7,R0
        MOV      R0,R6
        SWI      +27
        ADD      R0,R0,R7
        ADD      R0,R0,#+2
        SWI      +20
        MOV      R8,R0
        MOV      R1,R4
        SWI      +26
        CMP      R5,#+0
        STRBNE   R5,[R7, +R8]
        ADDNE    R7,R7,#+1
        MOV      R1,R6
        ADD      R0,R7,R8
        SWI      +26
        MOV      R0,R8
        POP      {R4-R8,PC}       ;; return
        CFI EndBlock cfiBlock1

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI NoFunction
        THUMB
??strcmp_nocase??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock2
        REQUIRE strcmp_nocase

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon1
        CFI Function strcmp_nocase
        ARM
strcmp_nocase:
??strcmp_nocase_0:
        LDRB     R2,[R0], #+1
        LDRB     R3,[R1], #+1
        TST      R2,#0x40
        ANDNE    R2,R2,#0xDF
        TST      R3,#0x40
        ANDNE    R3,R3,#0xDF
        SUBS     R2,R2,R3
        BNE      ??strcmp_nocase_1
        CMP      R3,#+0
        BNE      ??strcmp_nocase_0
??strcmp_nocase_1:
        MOV      R0,R2
        BX       LR               ;; return
        CFI EndBlock cfiBlock3

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock4 Using cfiCommon0
        CFI NoFunction
        THUMB
??char8to16??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock4
        REQUIRE char8to16

        RSEG DATA_C:CONST:SORT:NOROOT(2)
unicode2char:
        DATA
        DC16 1040
        DC8 128, 192, 225, 0
        DC16 1041
        DC8 129, 193, 226, 0
        DC16 1042
        DC8 130, 194, 247, 0
        DC16 1043
        DC8 131, 195, 231, 0
        DC16 1044
        DC8 132, 196, 228, 0
        DC16 1045
        DC8 133, 197, 229, 0
        DC16 1046
        DC8 134, 198, 246, 0
        DC16 1047
        DC8 135, 199, 250, 0
        DC16 1048
        DC8 136, 200, 233, 0
        DC16 1049
        DC8 137, 201, 234, 0
        DC16 1050
        DC8 138, 202, 235, 0
        DC16 1051
        DC8 139, 203, 236, 0
        DC16 1052
        DC8 140, 204, 237, 0
        DC16 1053
        DC8 141, 205, 238, 0
        DC16 1054
        DC8 142, 206, 239, 0
        DC16 1055
        DC8 143, 207, 240, 0
        DC16 1056
        DC8 144, 208, 242, 0
        DC16 1057
        DC8 145, 209, 243, 0
        DC16 1058
        DC8 146, 210, 244, 0
        DC16 1059
        DC8 147, 211, 245, 0
        DC16 1060
        DC8 148, 212, 230, 0
        DC16 1061
        DC8 149, 213, 232, 0
        DC16 1062
        DC8 150, 214, 227, 0
        DC16 1063
        DC8 151, 215, 254, 0
        DC16 1064
        DC8 152, 216, 251, 0
        DC16 1065
        DC8 153, 217, 253, 0
        DC16 1066
        DC8 154, 218, 255, 0
        DC16 1067
        DC8 155, 219, 249, 0
        DC16 1068
        DC8 156, 220, 248, 0
        DC16 1069
        DC8 157, 221, 252, 0
        DC16 1070
        DC8 158, 222, 224, 0
        DC16 1071
        DC8 159, 223, 241, 0
        DC16 1026
        DC8 95, 128, 95, 0
        DC16 1027
        DC8 95, 129, 95, 0
        DC16 1033
        DC8 95, 138, 95, 0
        DC16 1034
        DC8 95, 140, 95, 0
        DC16 1036
        DC8 95, 141, 95, 0
        DC16 1035
        DC8 95, 142, 95, 0
        DC16 1039
        DC8 95, 143, 95, 0
        DC16 1038
        DC8 246, 161, 95, 0
        DC16 1032
        DC8 74, 163, 74, 0
        DC16 1033
        DC8 131, 165, 189, 0
        DC16 1025
        DC8 240, 168, 179, 0
        DC16 1028
        DC8 242, 170, 180, 0
        DC16 1031
        DC8 244, 175, 183, 0
        DC16 1030
        DC8 73, 178, 182, 0
        DC16 1029
        DC8 83, 189, 83, 0
        DC16 1072
        DC8 160, 224, 193, 0
        DC16 1073
        DC8 161, 225, 194, 0
        DC16 1074
        DC8 162, 226, 215, 0
        DC16 1075
        DC8 163, 227, 199, 0
        DC16 1076
        DC8 164, 228, 196, 0
        DC16 1077
        DC8 165, 229, 197, 0
        DC16 1078
        DC8 166, 230, 214, 0
        DC16 1079
        DC8 167, 231, 218, 0
        DC16 1080
        DC8 168, 232, 201, 0
        DC16 1081
        DC8 169, 233, 202, 0
        DC16 1082
        DC8 170, 234, 203, 0
        DC16 1083
        DC8 171, 235, 204, 0
        DC16 1084
        DC8 172, 236, 205, 0
        DC16 1085
        DC8 173, 237, 206, 0
        DC16 1086
        DC8 174, 238, 207, 0
        DC16 1087
        DC8 175, 239, 208, 0
        DC16 1088
        DC8 224, 240, 210, 0
        DC16 1089
        DC8 225, 241, 211, 0
        DC16 1090
        DC8 226, 242, 212, 0
        DC16 1091
        DC8 227, 243, 213, 0
        DC16 1092
        DC8 228, 244, 198, 0
        DC16 1093
        DC8 229, 245, 200, 0
        DC16 1094
        DC8 230, 246, 195, 0
        DC16 1095
        DC8 231, 247, 222, 0
        DC16 1096
        DC8 232, 248, 219, 0
        DC16 1097
        DC8 233, 249, 221, 0
        DC16 1098
        DC8 234, 250, 223, 0
        DC16 1099
        DC8 235, 251, 217, 0
        DC16 1100
        DC8 236, 252, 216, 0
        DC16 1101
        DC8 237, 253, 220, 0
        DC16 1102
        DC8 238, 254, 192, 0
        DC16 1103
        DC8 239, 255, 209, 0
        DC16 1106
        DC8 95, 144, 95, 0
        DC16 1107
        DC8 95, 131, 95, 0
        DC16 1113
        DC8 95, 154, 95, 0
        DC16 1114
        DC8 95, 156, 95, 0
        DC16 1116
        DC8 95, 157, 95, 0
        DC16 1115
        DC8 95, 158, 95, 0
        DC16 1119
        DC8 95, 159, 95, 0
        DC16 1118
        DC8 247, 162, 95, 0
        DC16 1112
        DC8 106, 188, 106, 0
        DC16 1169
        DC8 163, 180, 173, 0
        DC16 1105
        DC8 241, 184, 163, 0
        DC16 1108
        DC8 243, 186, 164, 0
        DC16 1111
        DC8 245, 191, 167, 0
        DC16 1110
        DC8 105, 179, 166, 0
        DC16 1109
        DC8 115, 190, 115, 0
        DC16 160
        DC8 95, 160, 32, 0
        DC16 164
        DC8 95, 164, 253, 0
        DC16 166
        DC8 95, 166, 95, 0
        DC16 176
        DC8 248, 176, 156, 0
        DC16 183
        DC8 250, 183, 158, 0
        DC16 0
        DC8 0, 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
win2unicode:
        DATA
        DC16 1026, 1027, 8218, 1107, 8222, 8230, 8224, 8225, 8364, 8240, 1033
        DC16 8249, 1034, 1036, 1035, 1039, 1106, 8216, 8217, 8220, 8221, 8226
        DC16 8211, 8212, 32, 8482, 1113, 8250, 1114, 1116, 1115, 1119, 160
        DC16 1038, 1118, 1032, 164, 1168, 166, 167, 1025, 169, 1028, 171, 172
        DC16 173, 174, 1031, 176, 177, 1030, 1110, 1169, 181, 182, 183, 1105
        DC16 8470, 1108, 187, 1112, 1029, 1109, 1111, 1040, 1041, 1042, 1043
        DC16 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054
        DC16 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065
        DC16 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076
        DC16 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087
        DC16 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098
        DC16 1099, 1100, 1101, 1102, 1103

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon1
        CFI Function char8to16
        ARM
char8to16:
        CMP      R0,#+128
        BXLT     LR
        LDR      R2,??char8to16_0  ;; win2unicode
        MVN      R1,#+255
        ADD      R0,R2,R0, LSL #+1
        LDRH     R0,[R1, +R0]
        BX       LR               ;; return
        DATA
??char8to16_0:
        DC32     win2unicode
        CFI EndBlock cfiBlock5

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock6 Using cfiCommon0
        CFI NoFunction
        THUMB
??char16to8??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock6
        REQUIRE char16to8

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon1
        CFI Function char16to8
        ARM
char16to8:
        LDR      R1,??char16to8_0  ;; unicode2char
        CMP      R0,#+128
        BCS      ??char16to8_1
        BX       LR
??char16to8_2:
        ADD      R1,R1,#+6
??char16to8_1:
        LDRH     R2,[R1, #+0]
        CMP      R2,#+0
        BEQ      ??char16to8_3
        CMP      R0,R2
        BNE      ??char16to8_2
        LDRB     R0,[R1, #+3]
        BX       LR
??char16to8_3:
        AND      R0,R0,#0xFF
        CMP      R0,#+32
        MOVCC    R0,#+32
        BX       LR               ;; return
        DATA
??char16to8_0:
        DC32     unicode2char
        CFI EndBlock cfiBlock7

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock8 Using cfiCommon0
        CFI NoFunction
        THUMB
??ascii2ws??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock8
        REQUIRE ascii2ws

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon1
        CFI Function ascii2ws
        ARM
ascii2ws:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
        MOV      R4,R0
        MOV      R5,R1
        MOV      R1,#+0
        SWI      +294
        B        ??ascii2ws_0
??ascii2ws_1:
        BL       char8to16
        MOV      R1,R0
        MOV      R0,R4
        SWI      +28
??ascii2ws_0:
        LDRB     R1,[R5], #+1
        MOVS     R0,R1
        BNE      ??ascii2ws_1
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock9

        END
// 
// 312 bytes in segment CODE
// 856 bytes in segment DATA_C
// 
// 292 bytes of CODE  memory (+ 20 bytes shared)
// 856 bytes of CONST memory
//
//Errors: none
//Warnings: none
