FreeCalypso > hg > freecalypso-reveng
view bootrom-old/bootrom-old.disasm @ 339:77c86062e253
fluid-mnf/fluid.c: passes compilation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 13 Mar 2020 02:33:21 +0000 |
parents | 11761eaf712c |
children |
line wrap: on
line source
RESET entry and exception vectors: 0: ea0005c1 b 0x170c 4: ea00052a b 0x14b4 8: ea00052e b 0x14c8 c: ea000532 b 0x14dc 10: ea000536 b 0x14f0 14: ea00053a b 0x1504 18: ea00053e b 0x1518 1c: ea000542 b 0x152c ; matches C035 version 20: e24dd004 sub sp, sp, #4 24: e59f20b8 ldr r2, =0xfffffb10 ; via 0xe4 28: e1d2c0b0 ldrh r12, [r2] 2c: e20c10ff and r1, r12, #255 ; 0xff 30: e20ccb3f and r12, r12, #64512 ; 0xfc00 34: e181c00c orr r12, r1, r12 38: e1a0c80c mov r12, r12, lsl #16 3c: e1a0c82c mov r12, r12, lsr #16 40: e3500001 cmp r0, #1 44: 0a000005 beq 0x60 48: e3500000 cmp r0, #0 4c: 1a000006 bne 0x6c 50: e38ccc01 orr r12, r12, #256 ; 0x100 54: e1a0c80c mov r12, r12, lsl #16 58: e1a0c82c mov r12, r12, lsr #16 5c: ea000002 b 0x6c 60: e38ccc03 orr r12, r12, #768 ; 0x300 64: e1a0c80c mov r12, r12, lsl #16 68: e1a0c82c mov r12, r12, lsr #16 6c: e1c2c0b0 strh r12, [r2] 70: e3a0cfc3 mov r12, #780 ; 0x30c 74: e59f006c ldr r0, =0x80f5 ; via 0xe8 78: e10200bc strh r0, [r2, -r12] 7c: e3a0c000 mov r12, #0 80: e1cdc0b0 strh r12, [sp] 84: ea000002 b 0x94 88: e1ddc0b0 ldrh r12, [sp] 8c: e28cc001 add r12, r12, #1 90: e1cdc0b0 strh r12, [sp] 94: e1dd10b0 ldrh r1, [sp] 98: e3a0c902 mov r12, #32768 ; 0x8000 9c: e24ccead sub r12, r12, #2768 ; 0xad0 a0: e151000c cmp r1, r12 a4: bafffff7 blt 0x88 a8: e3a0cfc3 mov r12, #780 ; 0x30c ac: e10200bc strh r0, [r2, -r12] b0: e3a0c000 mov r12, #0 b4: e1cdc0b0 strh r12, [sp] b8: ea000002 b 0xc8 bc: e1ddc0b0 ldrh r12, [sp] c0: e28cc001 add r12, r12, #1 c4: e1cdc0b0 strh r12, [sp] c8: e1ddc0b0 ldrh r12, [sp] cc: e3a00902 mov r0, #32768 ; 0x8000 d0: e2400ead sub r0, r0, #2768 ; 0xad0 d4: e15c0000 cmp r12, r0 d8: bafffff7 blt 0xbc dc: e28dd004 add sp, sp, #4 e0: e12fff1e bx lr ; literal pool matches C035 version e4: fffffb10 e8: 000080f5 ; 0xec routine matches C035 version ; the data structure that lives at 0x800518 in the C035 version ; appears to reside at 0x800504 in this version ec: e92d4010 stmdb sp!, {r4, lr} f0: e59fcd0c ldr r12, =0x800504 ; via 0xe04 f4: e59c4014 ldr r4, [r12, #20] ; 0x14 f8: e59f0d08 ldr r0, =0x1fe8 ; via 0xe08 fc: e5dcc008 ldrb r12, [r12, #8] 100: e790c10c ldr r12, [r0, r12, lsl #2] 104: e28c0005 add r0, r12, #5 108: e5d0c000 ldrb r12, [r0] 10c: e31c0040 tst r12, #64 ; 0x40 110: 0afffffc beq 0x108 114: eb000585 bl 0x1730 ; IND_CALL 118: eafffffe b 0x118 ; 0x11c routine matches C035 version 11c: e3a0c004 mov r12, #4 120: e5c0c000 strb r12, [r0] 124: e3a0c000 mov r12, #0 128: e1c0c0be strh r12, [r0, #14] ; 0xe 12c: e1c0c1b0 strh r12, [r0, #16] ; 0x10 130: e580c014 str r12, [r0, #20] ; 0x14 134: e5c0c018 strb r12, [r0, #24] ; 0x18 138: e12fff1e bx lr ; 0x13c routine matches C035 version 13c: e92d4000 stmdb sp!, {lr} 140: e1a0c000 mov r12, r0 144: e59f0cc0 ldr r0, =0x8000f8 ; via 0xe0c 148: e3a0103e mov r1, #62 ; 0x3e 14c: e5c01000 strb r1, [r0] 150: e35c0009 cmp r12, #9 154: 88bd8000 ldmhiia sp!, {pc} 158: e28f1000 add r1, pc, #0 15c: e791f10c ldr pc, [r1, r12, lsl #2] ; switch table, absolute addresses 160: 000002ac 164: 00000280 168: 00000264 16c: 00000248 170: 00000224 174: 00000200 178: 000001dc 17c: 000001c0 180: 000001a4 184: 00000188 ; code appears to match C035 version 188: e3a0c042 mov r12, #66 ; 0x42 18c: e5c0c001 strb r12, [r0, #1] 190: e3a01002 mov r1, #2 194: e59fcc74 ldr r12, =0x80050c ; via 0xe10 198: e5dc2000 ldrb r2, [r12] 19c: eb000458 bl 0x1304 1a0: e8bd8000 ldmia sp!, {pc} 1a4: e3a0c062 mov r12, #98 ; 0x62 1a8: e5c0c001 strb r12, [r0, #1] 1ac: e3a01002 mov r1, #2 1b0: e59fcc58 ldr r12, =0x80050c ; via 0xe10 1b4: e5dc2000 ldrb r2, [r12] 1b8: eb000451 bl 0x1304 1bc: e8bd8000 ldmia sp!, {pc} 1c0: e3a0c061 mov r12, #97 ; 0x61 1c4: e5c0c001 strb r12, [r0, #1] 1c8: e3a01002 mov r1, #2 1cc: e59fcc3c ldr r12, =0x80050c ; via 0xe10 1d0: e5dc2000 ldrb r2, [r12] 1d4: eb00044a bl 0x1304 1d8: e8bd8000 ldmia sp!, {pc} 1dc: e3a0c043 mov r12, #67 ; 0x43 1e0: e5c0c001 strb r12, [r0, #1] 1e4: e59fcc18 ldr r12, =0x800504 ; via 0xe04 1e8: e5dc1010 ldrb r1, [r12, #16] ; 0x10 1ec: e5c01002 strb r1, [r0, #2] 1f0: e5dc2008 ldrb r2, [r12, #8] 1f4: e3a01003 mov r1, #3 1f8: eb000441 bl 0x1304 1fc: e8bd8000 ldmia sp!, {pc} 200: e3a0c063 mov r12, #99 ; 0x63 204: e5c0c001 strb r12, [r0, #1] 208: e59fcbf4 ldr r12, =0x800504 ; via 0xe04 20c: e5dc1010 ldrb r1, [r12, #16] ; 0x10 210: e5c01002 strb r1, [r0, #2] 214: e5dc2008 ldrb r2, [r12, #8] 218: e3a01003 mov r1, #3 21c: eb000438 bl 0x1304 220: e8bd8000 ldmia sp!, {pc} 224: e3a0c057 mov r12, #87 ; 0x57 228: e5c0c001 strb r12, [r0, #1] 22c: e59fcbd0 ldr r12, =0x800504 ; via 0xe04 230: e5dc1019 ldrb r1, [r12, #25] ; 0x19 234: e5c01002 strb r1, [r0, #2] 238: e5dc2008 ldrb r2, [r12, #8] 23c: e3a01003 mov r1, #3 240: eb00042f bl 0x1304 244: e8bd8000 ldmia sp!, {pc} 248: e3a0c077 mov r12, #119 ; 0x77 24c: e5c0c001 strb r12, [r0, #1] 250: e3a01002 mov r1, #2 254: e59fcbb4 ldr r12, =0x80050c ; via 0xe10 258: e5dc2000 ldrb r2, [r12] 25c: eb000428 bl 0x1304 260: e8bd8000 ldmia sp!, {pc} 264: e3a0c050 mov r12, #80 ; 0x50 268: e5c0c001 strb r12, [r0, #1] 26c: e3a01002 mov r1, #2 270: e59fcb98 ldr r12, =0x80050c ; via 0xe10 274: e5dc2000 ldrb r2, [r12] 278: eb000421 bl 0x1304 27c: e8bd8000 ldmia sp!, {pc} 280: e3a0c070 mov r12, #112 ; 0x70 284: e5c0c001 strb r12, [r0, #1] 288: e3a0c000 mov r12, #0 28c: e5c0c002 strb r12, [r0, #2] 290: e3a0c004 mov r12, #4 294: e5c0c003 strb r12, [r0, #3] 298: e3a01004 mov r1, #4 29c: e59fcb6c ldr r12, =0x80050c ; via 0xe10 2a0: e5dc2000 ldrb r2, [r12] 2a4: eb000416 bl 0x1304 2a8: e8bd8000 ldmia sp!, {pc} 2ac: e3a0c069 mov r12, #105 ; 0x69 2b0: e5c0c001 strb r12, [r0, #1] 2b4: e3a01002 mov r1, #2 2b8: e59fcb50 ldr r12, =0x80050c ; via 0xe10 2bc: e5dc2000 ldrb r2, [r12] 2c0: eb00040f bl 0x1304 2c4: e8bd8000 ldmia sp!, {pc} ; 0x2c8 routine matches C035 version 2c8: e92d4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} 2cc: e24dd004 sub sp, sp, #4 2d0: e1a0b000 mov r11, r0 2d4: e3a05000 mov r5, #0 2d8: e5cb5000 strb r5, [r11] 2dc: e59f7b30 ldr r7, =0x8000f0 ; via 0xe14 2e0: e59f4b1c ldr r4, =0x800504 ; via 0xe04 2e4: e5d40008 ldrb r0, [r4, #8] 2e8: e5971000 ldr r1, [r7] 2ec: e28d2002 add r2, sp, #2 2f0: eb00044c bl 0x1428 2f4: e3500000 cmp r0, #0 2f8: 0a0000fc beq 0x6f0 2fc: e5ddc002 ldrb r12, [sp, #2] 300: e25cc061 subs r12, r12, #97 ; 0x61 304: 0a000104 beq 0x71c 308: e25cc001 subs r12, r12, #1 30c: 0a0000ee beq 0x6cc 310: e25cc001 subs r12, r12, #1 314: 0a0000e1 beq 0x6a0 318: e25cc006 subs r12, r12, #6 31c: 0a0000dc beq 0x694 320: e25cc007 subs r12, r12, #7 324: 0a0000b8 beq 0x60c 328: e25cc007 subs r12, r12, #7 32c: 1a0000fc bne 0x724 330: e5c45018 strb r5, [r4, #24] ; 0x18 334: e3a0a000 mov r10, #0 338: e3a06000 mov r6, #0 33c: ea000015 b 0x398 340: e5d40008 ldrb r0, [r4, #8] 344: e5971000 ldr r1, [r7] 348: e28d2002 add r2, sp, #2 34c: eb000435 bl 0x1428 350: e3500000 cmp r0, #0 354: 0a0000e5 beq 0x6f0 358: e5ddc002 ldrb r12, [sp, #2] 35c: e35c003c cmp r12, #60 ; 0x3c 360: 0a000001 beq 0x36c 364: e3a0c001 mov r12, #1 368: e5c4c018 strb r12, [r4, #24] ; 0x18 36c: e5d40008 ldrb r0, [r4, #8] 370: e5971000 ldr r1, [r7] 374: e28d2002 add r2, sp, #2 378: eb00042a bl 0x1428 37c: e3500000 cmp r0, #0 380: 0a0000da beq 0x6f0 384: e5ddc002 ldrb r12, [sp, #2] 388: e35c0077 cmp r12, #119 ; 0x77 38c: 0a000001 beq 0x398 390: e3a0c001 mov r12, #1 394: e5c4c018 strb r12, [r4, #24] ; 0x18 398: e5d40008 ldrb r0, [r4, #8] 39c: e5971000 ldr r1, [r7] 3a0: e1a0200d mov r2, sp 3a4: eb00041f bl 0x1428 3a8: e3500000 cmp r0, #0 3ac: 0a0000cf beq 0x6f0 3b0: e5d40008 ldrb r0, [r4, #8] 3b4: e5971000 ldr r1, [r7] 3b8: e28d2001 add r2, sp, #1 3bc: eb000419 bl 0x1428 3c0: e3500000 cmp r0, #0 3c4: 0a0000c9 beq 0x6f0 3c8: e5dd0000 ldrb r0, [sp] 3cc: e5ddc001 ldrb r12, [sp, #1] 3d0: e150000c cmp r0, r12 3d4: 1a000000 bne 0x3dc 3d8: e3a0a001 mov r10, #1 3dc: e5dd0000 ldrb r0, [sp] 3e0: e5ddc001 ldrb r12, [sp, #1] 3e4: e150000c cmp r0, r12 3e8: ca00007c bgt 0x5e0 3ec: e5ddc001 ldrb r12, [sp, #1] 3f0: e35c0000 cmp r12, #0 3f4: 0a000079 beq 0x5e0 3f8: e5ddc000 ldrb r12, [sp] 3fc: e35c0000 cmp r12, #0 400: 0a000076 beq 0x5e0 404: e3a08002 mov r8, #2 408: e3a05000 mov r5, #0 40c: e5d40008 ldrb r0, [r4, #8] 410: e5971000 ldr r1, [r7] 414: e28d2002 add r2, sp, #2 418: eb000402 bl 0x1428 41c: e3500000 cmp r0, #0 420: 0a0000b2 beq 0x6f0 424: e5ddc002 ldrb r12, [sp, #2] 428: e18cc405 orr r12, r12, r5, lsl #8 42c: e1a0c80c mov r12, r12, lsl #16 430: e1a0582c mov r5, r12, lsr #16 434: e2588001 subs r8, r8, #1 438: 1afffff3 bne 0x40c 43c: e3a09004 mov r9, #4 440: e3a08000 mov r8, #0 444: e5d40008 ldrb r0, [r4, #8] 448: e5971000 ldr r1, [r7] 44c: e28d2002 add r2, sp, #2 450: eb0003f4 bl 0x1428 454: e3500000 cmp r0, #0 458: 0a0000a4 beq 0x6f0 45c: e5ddc002 ldrb r12, [sp, #2] 460: e18c8408 orr r8, r12, r8, lsl #8 464: e2599001 subs r9, r9, #1 468: 1afffff5 bne 0x444 46c: e59fc9a4 ldr r12, =0x80073c ; via 0xe18 470: e158000c cmp r8, r12 474: 3a00004e bcc 0x5b4 478: e59f099c ldr r0, =0x7f8c3 ; via 0xe1c 47c: e080c00c add r12, r0, r12 480: e158000c cmp r8, r12 484: 8a00004a bhi 0x5b4 488: e085c006 add r12, r5, r6 48c: e35c0ffe cmp r12, #1016 ; 0x3f8 490: aa000037 bge 0x574 494: e59fc970 ldr r12, =0x8000f8 ; via 0xe0c 498: e5dd0000 ldrb r0, [sp] 49c: e7c6000c strb r0, [r6, r12] 4a0: e2860001 add r0, r6, #1 4a4: e1a00800 mov r0, r0, lsl #16 4a8: e1a06820 mov r6, r0, lsr #16 4ac: e5dd0001 ldrb r0, [sp, #1] 4b0: e7c6000c strb r0, [r6, r12] 4b4: e2860001 add r0, r6, #1 4b8: e1a00800 mov r0, r0, lsl #16 4bc: e1a06820 mov r6, r0, lsr #16 4c0: e1a00425 mov r0, r5, lsr #8 4c4: e7c6000c strb r0, [r6, r12] 4c8: e2860001 add r0, r6, #1 4cc: e1a00800 mov r0, r0, lsl #16 4d0: e1a06820 mov r6, r0, lsr #16 4d4: e7c6500c strb r5, [r6, r12] 4d8: e2860001 add r0, r6, #1 4dc: e1a00800 mov r0, r0, lsl #16 4e0: e1a06820 mov r6, r0, lsr #16 4e4: e1a00c28 mov r0, r8, lsr #24 4e8: e7c6000c strb r0, [r6, r12] 4ec: e2860001 add r0, r6, #1 4f0: e1a00800 mov r0, r0, lsl #16 4f4: e1a06820 mov r6, r0, lsr #16 4f8: e1a00828 mov r0, r8, lsr #16 4fc: e7c6000c strb r0, [r6, r12] 500: e2860001 add r0, r6, #1 504: e1a00800 mov r0, r0, lsl #16 508: e1a06820 mov r6, r0, lsr #16 50c: e1a00428 mov r0, r8, lsr #8 510: e7c6000c strb r0, [r6, r12] 514: e2860001 add r0, r6, #1 518: e1a00800 mov r0, r0, lsl #16 51c: e1a06820 mov r6, r0, lsr #16 520: e086900c add r9, r6, r12 524: e5c98000 strb r8, [r9] 528: e286c001 add r12, r6, #1 52c: e1a0c80c mov r12, r12, lsl #16 530: e1a0682c mov r6, r12, lsr #16 534: e3550000 cmp r5, #0 538: 0a000018 beq 0x5a0 53c: e085c006 add r12, r5, r6 540: e1a0c80c mov r12, r12, lsl #16 544: e1a0682c mov r6, r12, lsr #16 548: e2899001 add r9, r9, #1 54c: e5d40008 ldrb r0, [r4, #8] 550: e5971000 ldr r1, [r7] 554: e1a02009 mov r2, r9 558: eb0003b2 bl 0x1428 55c: e3500000 cmp r0, #0 560: 0a000062 beq 0x6f0 564: e2899001 add r9, r9, #1 568: e2555001 subs r5, r5, #1 56c: 1afffff6 bne 0x54c 570: ea00000a b 0x5a0 574: e285c001 add r12, r5, #1 578: e1a0c80c mov r12, r12, lsl #16 57c: e1a0582c mov r5, r12, lsr #16 580: e5d40008 ldrb r0, [r4, #8] 584: e5971000 ldr r1, [r7] 588: e28d2002 add r2, sp, #2 58c: eb0003a5 bl 0x1428 590: e3500000 cmp r0, #0 594: 0a000055 beq 0x6f0 598: e2555001 subs r5, r5, #1 59c: 1afffff7 bne 0x580 5a0: e35a0000 cmp r10, #0 5a4: 0affff65 beq 0x340 5a8: e3a0c003 mov r12, #3 5ac: e5cbc000 strb r12, [r11] 5b0: ea00005b b 0x724 5b4: e3a0c001 mov r12, #1 5b8: e5c4c018 strb r12, [r4, #24] ; 0x18 5bc: e3a0c003 mov r12, #3 5c0: e5cbc000 strb r12, [r11] 5c4: e5d40008 ldrb r0, [r4, #8] 5c8: e59f1850 ldr r1, =0xfffff ; via 0xe20 5cc: e28d2002 add r2, sp, #2 5d0: eb000394 bl 0x1428 5d4: e3500001 cmp r0, #1 5d8: 0afffff9 beq 0x5c4 5dc: ea000050 b 0x724 5e0: e3a0c001 mov r12, #1 5e4: e5c4c018 strb r12, [r4, #24] ; 0x18 5e8: e3a0c003 mov r12, #3 5ec: e5cbc000 strb r12, [r11] 5f0: e5d40008 ldrb r0, [r4, #8] 5f4: e59f1824 ldr r1, =0xfffff ; via 0xe20 5f8: e28d2002 add r2, sp, #2 5fc: eb000389 bl 0x1428 600: e3500001 cmp r0, #1 604: 0afffff9 beq 0x5f0 608: ea000045 b 0x724 60c: e59f67f8 ldr r6, =0x8000f8 ; via 0xe0c 610: e3a08009 mov r8, #9 614: e5d40008 ldrb r0, [r4, #8] 618: e5971000 ldr r1, [r7] 61c: e1a02006 mov r2, r6 620: eb000380 bl 0x1428 624: e3500000 cmp r0, #0 628: 0a000030 beq 0x6f0 62c: e2866001 add r6, r6, #1 630: e2588001 subs r8, r8, #1 634: 1afffff6 bne 0x614 638: e59fc7cc ldr r12, =0x8000f8 ; via 0xe0c 63c: e5dc0000 ldrb r0, [r12] 640: e5c40000 strb r0, [r4] 644: e5dc0001 ldrb r0, [r12, #1] 648: e5c40009 strb r0, [r4, #9] 64c: e1c450ba strh r5, [r4, #10] ; 0xa 650: e5dc1003 ldrb r1, [r12, #3] 654: e5dc0002 ldrb r0, [r12, #2] 658: e1810400 orr r0, r1, r0, lsl #8 65c: e1c400ba strh r0, [r4, #10] ; 0xa 660: e5dc0004 ldrb r0, [r12, #4] 664: e5c4000d strb r0, [r4, #13] ; 0xd 668: e5dc0006 ldrb r0, [r12, #6] 66c: e5dc1005 ldrb r1, [r12, #5] 670: e1801401 orr r1, r0, r1, lsl #8 674: e5dc0007 ldrb r0, [r12, #7] 678: e1800401 orr r0, r0, r1, lsl #8 67c: e5dcc008 ldrb r12, [r12, #8] 680: e18cc400 orr r12, r12, r0, lsl #8 684: e584c004 str r12, [r4, #4] 688: e3a0c002 mov r12, #2 68c: e5cbc000 strb r12, [r11] 690: ea000023 b 0x724 694: e3a0c001 mov r12, #1 698: e5cbc000 strb r12, [r11] 69c: ea000020 b 0x724 6a0: e5d40008 ldrb r0, [r4, #8] 6a4: e5971000 ldr r1, [r7] 6a8: e28d2002 add r2, sp, #2 6ac: eb00035d bl 0x1428 6b0: e3500000 cmp r0, #0 6b4: 0a00000d beq 0x6f0 6b8: e5ddc002 ldrb r12, [sp, #2] 6bc: e1c4c0be strh r12, [r4, #14] ; 0xe 6c0: e3a0c004 mov r12, #4 6c4: e5cbc000 strb r12, [r11] 6c8: ea000015 b 0x724 6cc: e3a0c000 mov r12, #0 6d0: e584c014 str r12, [r4, #20] ; 0x14 6d4: e3a05004 mov r5, #4 6d8: e5d40008 ldrb r0, [r4, #8] 6dc: e5971000 ldr r1, [r7] 6e0: e28d2002 add r2, sp, #2 6e4: eb00034f bl 0x1428 6e8: e3500000 cmp r0, #0 6ec: 1a000001 bne 0x6f8 6f0: e3a00000 mov r0, #0 6f4: ea00000b b 0x728 6f8: e5dd0002 ldrb r0, [sp, #2] 6fc: e594c014 ldr r12, [r4, #20] ; 0x14 700: e180c40c orr r12, r0, r12, lsl #8 704: e584c014 str r12, [r4, #20] ; 0x14 708: e2555001 subs r5, r5, #1 70c: 1afffff1 bne 0x6d8 710: e3a0c006 mov r12, #6 714: e5cbc000 strb r12, [r11] 718: ea000001 b 0x724 71c: e3a0c005 mov r12, #5 720: e5cbc000 strb r12, [r11] 724: e3a00001 mov r0, #1 728: e28dd004 add sp, sp, #4 72c: e8bd8ff0 ldmia sp!, {r4, r5, r6, r7, r8, r9, r10, r11, pc} ; 0x730 routine matches C035 version 730: e92d43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 734: e59f46c8 ldr r4, =0x800504 ; via 0xe04 738: e5d4c018 ldrb r12, [r4, #24] ; 0x18 73c: e35c0001 cmp r12, #1 740: 0a00004a beq 0x870 744: e59f56c0 ldr r5, =0x8000f8 ; via 0xe0c 748: e59f66c8 ldr r6, =0x80073c ; via 0xe18 74c: e3a07000 mov r7, #0 750: e3a00000 mov r0, #0 754: e080c005 add r12, r0, r5 758: e28cc001 add r12, r12, #1 75c: e7d02005 ldrb r2, [r0, r5] 760: e5dc1000 ldrb r1, [r12] 764: e1520001 cmp r2, r1 768: 1a000000 bne 0x770 76c: e3a07001 mov r7, #1 770: e5dc2002 ldrb r2, [r12, #2] 774: e5dc1001 ldrb r1, [r12, #1] 778: e0821401 add r1, r2, r1, lsl #8 77c: e1a01801 mov r1, r1, lsl #16 780: e1a01821 mov r1, r1, lsr #16 784: e5dc3004 ldrb r3, [r12, #4] 788: e5dc2003 ldrb r2, [r12, #3] 78c: e0832402 add r2, r3, r2, lsl #8 790: e5dc3005 ldrb r3, [r12, #5] 794: e0832402 add r2, r3, r2, lsl #8 798: e5dcc006 ldrb r12, [r12, #6] 79c: e08c2402 add r2, r12, r2, lsl #8 7a0: e202c0ff and r12, r2, #255 ; 0xff 7a4: e081300c add r3, r1, r12 7a8: e1a0c422 mov r12, r2, lsr #8 7ac: e20cc0ff and r12, r12, #255 ; 0xff 7b0: e08c3003 add r3, r12, r3 7b4: e1a0c822 mov r12, r2, lsr #16 7b8: e20cc0ff and r12, r12, #255 ; 0xff 7bc: e08cc003 add r12, r12, r3 7c0: e08ccc22 add r12, r12, r2, lsr #24 7c4: e28cc005 add r12, r12, #5 7c8: e1a0c80c mov r12, r12, lsl #16 7cc: e1a0882c mov r8, r12, lsr #16 7d0: e3a03000 mov r3, #0 7d4: e1520006 cmp r2, r6 7d8: 3a000003 bcc 0x7ec 7dc: e59fc638 ldr r12, =0x7f8c3 ; via 0xe1c 7e0: e08cc006 add r12, r12, r6 7e4: e152000c cmp r2, r12 7e8: 9a000001 bls 0x7f4 7ec: e383c001 orr r12, r3, #1 7f0: e20c30ff and r3, r12, #255 ; 0xff 7f4: e3530000 cmp r3, #0 7f8: 1a00001d bne 0x874 7fc: e3a09000 mov r9, #0 800: e3510000 cmp r1, #0 804: 0a00000b beq 0x838 808: e089c000 add r12, r9, r0 80c: e085c00c add r12, r5, r12 810: e5dcc008 ldrb r12, [r12, #8] 814: e4c2c001 strb r12, [r2], #1 818: e08cc008 add r12, r12, r8 81c: e1a0c80c mov r12, r12, lsl #16 820: e1a0882c mov r8, r12, lsr #16 824: e289c001 add r12, r9, #1 828: e1a0c80c mov r12, r12, lsl #16 82c: e1a0982c mov r9, r12, lsr #16 830: e2511001 subs r1, r1, #1 834: 1afffff3 bne 0x808 838: e3a0c0ff mov r12, #255 ; 0xff 83c: e1ccc008 bic r12, r12, r8 840: e1a0c80c mov r12, r12, lsl #16 844: e1a0882c mov r8, r12, lsr #16 848: e1d4c1b0 ldrh r12, [r4, #16] ; 0x10 84c: e088c00c add r12, r8, r12 850: e1c4c1b0 strh r12, [r4, #16] ; 0x10 854: e080c009 add r12, r0, r9 858: e28cc008 add r12, r12, #8 85c: e1a0c80c mov r12, r12, lsl #16 860: e1a0082c mov r0, r12, lsr #16 864: e3570000 cmp r7, #0 868: 0affffb9 beq 0x754 86c: ea000000 b 0x874 870: e3a03002 mov r3, #2 874: e5c43019 strb r3, [r4, #25] ; 0x19 878: e3530000 cmp r3, #0 87c: 0a000008 beq 0x8a4 880: e3a00004 mov r0, #4 884: ebfffe2c bl 0x13c 888: e5d41008 ldrb r1, [r4, #8] 88c: e3a00004 mov r0, #4 890: eb0002d0 bl 0x13d8 894: e1a00004 mov r0, r4 898: ebfffe1f bl 0x11c 89c: e3a00001 mov r0, #1 8a0: e8bd83f0 ldmia sp!, {r4, r5, r6, r7, r8, r9, pc} 8a4: e3a00003 mov r0, #3 8a8: ebfffe23 bl 0x13c 8ac: e3a00000 mov r0, #0 8b0: e8bd83f0 ldmia sp!, {r4, r5, r6, r7, r8, r9, pc} ; 0x8b4 routine matches C035 version 8b4: e92d4070 stmdb sp!, {r4, r5, r6, lr} 8b8: e24dd008 sub sp, sp, #8 8bc: e59f4560 ldr r4, =0x8000f4 ; via 0xe24 8c0: e5d4c000 ldrb r12, [r4] 8c4: e25cc001 subs r12, r12, #1 8c8: 0a000102 beq 0xcd8 8cc: e25cc001 subs r12, r12, #1 8d0: 0a00008a beq 0xb00 8d4: e25cc001 subs r12, r12, #1 8d8: 0a000047 beq 0x9fc 8dc: e25cc001 subs r12, r12, #1 8e0: 1a000145 bne 0xdfc 8e4: e250c001 subs r12, r0, #1 8e8: 0a00003c beq 0x9e0 8ec: e25cc002 subs r12, r12, #2 8f0: 0a00002f beq 0x9b4 8f4: e25cc001 subs r12, r12, #1 8f8: 0a000022 beq 0x988 8fc: e25cc001 subs r12, r12, #1 900: 0a000017 beq 0x964 904: e25cc001 subs r12, r12, #1 908: 1a00013b bne 0xdfc 90c: e59f54f0 ldr r5, =0x800504 ; via 0xe04 910: e59f0500 ldr r0, =0x80073c ; via 0xe18 914: e595c014 ldr r12, [r5, #20] ; 0x14 918: e15c0000 cmp r12, r0 91c: 3a000006 bcc 0x93c 920: e59f14f4 ldr r1, =0x7f8c3 ; via 0xe1c 924: e0810000 add r0, r1, r0 928: e15c0000 cmp r12, r0 92c: 8a000002 bhi 0x93c 930: e3a00008 mov r0, #8 934: ebfffe00 bl 0x13c 938: ebfffdeb bl 0xec 93c: e3a00009 mov r0, #9 940: ebfffdfd bl 0x13c 944: e5d51008 ldrb r1, [r5, #8] 948: e3a00004 mov r0, #4 94c: eb0002a1 bl 0x13d8 950: e1a00005 mov r0, r5 954: ebfffdf0 bl 0x11c 958: e3a0c001 mov r12, #1 95c: e5c4c000 strb r12, [r4] 960: ea000125 b 0xdfc 964: e59f5498 ldr r5, =0x800504 ; via 0xe04 968: e1a00005 mov r0, r5 96c: ebfffdea bl 0x11c 970: e5d51008 ldrb r1, [r5, #8] 974: e3a00004 mov r0, #4 978: eb000296 bl 0x13d8 97c: e3a0c001 mov r12, #1 980: e5c4c000 strb r12, [r4] 984: ea00011c b 0xdfc 988: e3a00006 mov r0, #6 98c: ebfffdea bl 0x13c 990: e59f546c ldr r5, =0x800504 ; via 0xe04 994: e5d51008 ldrb r1, [r5, #8] 998: e3a00004 mov r0, #4 99c: eb00028d bl 0x13d8 9a0: e1a00005 mov r0, r5 9a4: ebfffddc bl 0x11c 9a8: e3a0c001 mov r12, #1 9ac: e5c4c000 strb r12, [r4] 9b0: ea000111 b 0xdfc 9b4: e3a00004 mov r0, #4 9b8: ebfffddf bl 0x13c 9bc: e59f5440 ldr r5, =0x800504 ; via 0xe04 9c0: e5d51008 ldrb r1, [r5, #8] 9c4: e3a00004 mov r0, #4 9c8: eb000282 bl 0x13d8 9cc: e1a00005 mov r0, r5 9d0: ebfffdd1 bl 0x11c 9d4: e3a0c001 mov r12, #1 9d8: e5c4c000 strb r12, [r4] 9dc: ea000106 b 0xdfc 9e0: e59f041c ldr r0, =0x800504 ; via 0xe04 9e4: ebfffdcc bl 0x11c 9e8: e3a00000 mov r0, #0 9ec: ebfffdd2 bl 0x13c 9f0: e3a0c004 mov r12, #4 9f4: e5c4c000 strb r12, [r4] 9f8: ea0000ff b 0xdfc 9fc: e250c001 subs r12, r0, #1 a00: 0a000037 beq 0xae4 a04: e25cc002 subs r12, r12, #2 a08: 0a000031 beq 0xad4 a0c: e25cc001 subs r12, r12, #1 a10: 0a000017 beq 0xa74 a14: e25cc001 subs r12, r12, #1 a18: 0a00000c beq 0xa50 a1c: e25cc001 subs r12, r12, #1 a20: 1a0000f5 bne 0xdfc a24: e3a00009 mov r0, #9 a28: ebfffdc3 bl 0x13c a2c: e59f53d0 ldr r5, =0x800504 ; via 0xe04 a30: e5d51008 ldrb r1, [r5, #8] a34: e3a00004 mov r0, #4 a38: eb000266 bl 0x13d8 a3c: e1a00005 mov r0, r5 a40: ebfffdb5 bl 0x11c a44: e3a0c001 mov r12, #1 a48: e5c4c000 strb r12, [r4] a4c: ea0000ea b 0xdfc a50: e59f53ac ldr r5, =0x800504 ; via 0xe04 a54: e1a00005 mov r0, r5 a58: ebfffdaf bl 0x11c a5c: e5d51008 ldrb r1, [r5, #8] a60: e3a00004 mov r0, #4 a64: eb00025b bl 0x13d8 a68: e3a0c001 mov r12, #1 a6c: e5c4c000 strb r12, [r4] a70: ea0000e1 b 0xdfc a74: e59fc388 ldr r12, =0x800504 ; via 0xe04 a78: e3a010ff mov r1, #255 ; 0xff a7c: e1dc01b0 ldrh r0, [r12, #16] ; 0x10 a80: e1c10000 bic r0, r1, r0 a84: e1dcc0be ldrh r12, [r12, #14] ; 0xe a88: e20cc0ff and r12, r12, #255 ; 0xff a8c: e150000c cmp r0, r12 a90: 1a000004 bne 0xaa8 a94: e3a00005 mov r0, #5 a98: ebfffda7 bl 0x13c a9c: e3a0c004 mov r12, #4 aa0: e5c4c000 strb r12, [r4] aa4: ea0000d4 b 0xdfc aa8: e3a00006 mov r0, #6 aac: ebfffda2 bl 0x13c ab0: e59f534c ldr r5, =0x800504 ; via 0xe04 ab4: e1a00005 mov r0, r5 ab8: ebfffd97 bl 0x11c abc: e5d51008 ldrb r1, [r5, #8] ac0: e3a00004 mov r0, #4 ac4: eb000243 bl 0x13d8 ac8: e3a0c001 mov r12, #1 acc: e5c4c000 strb r12, [r4] ad0: ea0000c9 b 0xdfc ad4: ebffff15 bl 0x730 ad8: e3500000 cmp r0, #0 adc: 0a000038 beq 0xbc4 ae0: ea00003a b 0xbd0 ae4: e59f0318 ldr r0, =0x800504 ; via 0xe04 ae8: ebfffd8b bl 0x11c aec: e3a00000 mov r0, #0 af0: ebfffd91 bl 0x13c af4: e3a0c003 mov r12, #3 af8: e5c4c000 strb r12, [r4] afc: ea0000be b 0xdfc b00: e250c001 subs r12, r0, #1 b04: 0a00006c beq 0xcbc b08: e25cc001 subs r12, r12, #1 b0c: 0a000032 beq 0xbdc b10: e25cc001 subs r12, r12, #1 b14: 0a000024 beq 0xbac b18: e25cc001 subs r12, r12, #1 b1c: 0a000017 beq 0xb80 b20: e25cc001 subs r12, r12, #1 b24: 0a00000c beq 0xb5c b28: e25cc001 subs r12, r12, #1 b2c: 1a0000b2 bne 0xdfc b30: e3a00009 mov r0, #9 b34: ebfffd80 bl 0x13c b38: e59f52c4 ldr r5, =0x800504 ; via 0xe04 b3c: e5d51008 ldrb r1, [r5, #8] b40: e3a00004 mov r0, #4 b44: eb000223 bl 0x13d8 b48: e1a00005 mov r0, r5 b4c: ebfffd72 bl 0x11c b50: e3a0c001 mov r12, #1 b54: e5c4c000 strb r12, [r4] b58: ea0000a7 b 0xdfc b5c: e59f52a0 ldr r5, =0x800504 ; via 0xe04 b60: e1a00005 mov r0, r5 b64: ebfffd6c bl 0x11c b68: e5d51008 ldrb r1, [r5, #8] b6c: e3a00004 mov r0, #4 b70: eb000218 bl 0x13d8 b74: e3a0c001 mov r12, #1 b78: e5c4c000 strb r12, [r4] b7c: ea00009e b 0xdfc b80: e3a00006 mov r0, #6 b84: ebfffd6c bl 0x13c b88: e59f5274 ldr r5, =0x800504 ; via 0xe04 b8c: e5d51008 ldrb r1, [r5, #8] b90: e3a00004 mov r0, #4 b94: eb00020f bl 0x13d8 b98: e1a00005 mov r0, r5 b9c: ebfffd5e bl 0x11c ba0: e3a0c001 mov r12, #1 ba4: e5c4c000 strb r12, [r4] ba8: ea000093 b 0xdfc bac: e59f0274 ldr r0, =0x800514 ; via 0xe28 bb0: e3a0c000 mov r12, #0 bb4: e1c0c0b0 strh r12, [r0] bb8: ebfffedc bl 0x730 bbc: e3500000 cmp r0, #0 bc0: 1a000002 bne 0xbd0 bc4: e3a0c003 mov r12, #3 bc8: e5c4c000 strb r12, [r4] bcc: ea00008a b 0xdfc bd0: e3a0c001 mov r12, #1 bd4: e5c4c000 strb r12, [r4] bd8: ea000087 b 0xdfc bdc: e59f6220 ldr r6, =0x800504 ; via 0xe04 be0: e5d6c000 ldrb r12, [r6] be4: e35c0000 cmp r12, #0 be8: 0a000011 beq 0xc34 bec: e35c0001 cmp r12, #1 bf0: 0a00000f beq 0xc34 bf4: e35c0002 cmp r12, #2 bf8: 0a00000d beq 0xc34 bfc: e35c0003 cmp r12, #3 c00: 0a00000b beq 0xc34 c04: e35c0004 cmp r12, #4 c08: 0a000009 beq 0xc34 c0c: e3a00002 mov r0, #2 c10: ebfffd49 bl 0x13c c14: e5d61008 ldrb r1, [r6, #8] c18: e3a00004 mov r0, #4 c1c: eb0001ed bl 0x13d8 c20: e1a00006 mov r0, r6 c24: ebfffd3c bl 0x11c c28: e3a0c001 mov r12, #1 c2c: e5c4c000 strb r12, [r4] c30: ea000071 b 0xdfc c34: e5d6500d ldrb r5, [r6, #13] ; 0xd c38: e1d6c0ba ldrh r12, [r6, #10] ; 0xa c3c: e20c001f and r0, r12, #31 ; 0x1f c40: e20000ff and r0, r0, #255 ; 0xff c44: e1a012ac mov r1, r12, lsr #5 c48: e201101f and r1, r1, #31 ; 0x1f c4c: e20110ff and r1, r1, #255 ; 0xff c50: e1a0c52c mov r12, r12, lsr #10 c54: e20cc01f and r12, r12, #31 ; 0x1f c58: e20c20ff and r2, r12, #255 ; 0xff c5c: e205c00f and r12, r5, #15 ; 0xf c60: e20c30ff and r3, r12, #255 ; 0xff c64: e1a0c225 mov r12, r5, lsr #4 c68: e5cdc000 strb r12, [sp] c6c: eb00006e bl 0xe2c c70: e5d6c009 ldrb r12, [r6, #9] c74: e5d6000c ldrb r0, [r6, #12] ; 0xc c78: e20c1003 and r1, r12, #3 c7c: e20110ff and r1, r1, #255 ; 0xff c80: e1a0c12c mov r12, r12, lsr #2 c84: e20cc01f and r12, r12, #31 ; 0x1f c88: e20c20ff and r2, r12, #255 ; 0xff c8c: eb000098 bl 0xef4 c90: e3a00001 mov r0, #1 c94: ebfffd28 bl 0x13c c98: e5d60000 ldrb r0, [r6] c9c: e5d61008 ldrb r1, [r6, #8] ca0: eb0001cc bl 0x13d8 ca4: e59fc168 ldr r12, =0x8000f0 ; via 0xe14 ca8: e5960004 ldr r0, [r6, #4] cac: e58c0000 str r0, [r12] cb0: e3a0c002 mov r12, #2 cb4: e5c4c000 strb r12, [r4] cb8: ea00004f b 0xdfc cbc: e59f0140 ldr r0, =0x800504 ; via 0xe04 cc0: ebfffd15 bl 0x11c cc4: e3a00000 mov r0, #0 cc8: ebfffd1b bl 0x13c ccc: e3a0c002 mov r12, #2 cd0: e5c4c000 strb r12, [r4] cd4: ea000048 b 0xdfc cd8: e250c001 subs r12, r0, #1 cdc: 0a000040 beq 0xde4 ce0: e25cc001 subs r12, r12, #1 ce4: 0a00000b beq 0xd18 ce8: e24cc001 sub r12, r12, #1 cec: e35c0003 cmp r12, #3 cf0: 8a000041 bhi 0xdfc cf4: e59f5108 ldr r5, =0x800504 ; via 0xe04 cf8: e1a00005 mov r0, r5 cfc: ebfffd06 bl 0x11c d00: e5d51008 ldrb r1, [r5, #8] d04: e3a00004 mov r0, #4 d08: eb0001b2 bl 0x13d8 d0c: e3a0c001 mov r12, #1 d10: e5c4c000 strb r12, [r4] d14: ea000038 b 0xdfc d18: e59f60e4 ldr r6, =0x800504 ; via 0xe04 d1c: e5d6c000 ldrb r12, [r6] d20: e35c0000 cmp r12, #0 d24: 0a00000c beq 0xd5c d28: e35c0001 cmp r12, #1 d2c: 0a00000a beq 0xd5c d30: e35c0002 cmp r12, #2 d34: 0a000008 beq 0xd5c d38: e35c0003 cmp r12, #3 d3c: 0a000006 beq 0xd5c d40: e35c0004 cmp r12, #4 d44: 0a000004 beq 0xd5c d48: e3a00002 mov r0, #2 d4c: ebfffcfa bl 0x13c d50: e3a0c001 mov r12, #1 d54: e5c4c000 strb r12, [r4] d58: ea000027 b 0xdfc d5c: e5d6500d ldrb r5, [r6, #13] ; 0xd d60: e1d6c0ba ldrh r12, [r6, #10] ; 0xa d64: e20c001f and r0, r12, #31 ; 0x1f d68: e20000ff and r0, r0, #255 ; 0xff d6c: e1a012ac mov r1, r12, lsr #5 d70: e201101f and r1, r1, #31 ; 0x1f d74: e20110ff and r1, r1, #255 ; 0xff d78: e1a0c52c mov r12, r12, lsr #10 d7c: e20cc01f and r12, r12, #31 ; 0x1f d80: e20c20ff and r2, r12, #255 ; 0xff d84: e205c00f and r12, r5, #15 ; 0xf d88: e20c30ff and r3, r12, #255 ; 0xff d8c: e1a0c225 mov r12, r5, lsr #4 d90: e5cdc000 strb r12, [sp] d94: eb000024 bl 0xe2c d98: e5d6c009 ldrb r12, [r6, #9] d9c: e5d6000c ldrb r0, [r6, #12] ; 0xc da0: e20c1003 and r1, r12, #3 da4: e20110ff and r1, r1, #255 ; 0xff da8: e1a0c12c mov r12, r12, lsr #2 dac: e20cc01f and r12, r12, #31 ; 0x1f db0: e20c20ff and r2, r12, #255 ; 0xff db4: eb00004e bl 0xef4 db8: e3a00001 mov r0, #1 dbc: ebfffcde bl 0x13c dc0: e5d60000 ldrb r0, [r6] dc4: e5d61008 ldrb r1, [r6, #8] dc8: eb000182 bl 0x13d8 dcc: e59f0040 ldr r0, =0x8000f0 ; via 0xe14 dd0: e596c004 ldr r12, [r6, #4] dd4: e580c000 str r12, [r0] dd8: e3a0c002 mov r12, #2 ddc: e5c4c000 strb r12, [r4] de0: ea000005 b 0xdfc de4: e59f0018 ldr r0, =0x800504 ; via 0xe04 de8: ebfffccb bl 0x11c dec: e3a00000 mov r0, #0 df0: ebfffcd1 bl 0x13c df4: e3a0c001 mov r12, #1 df8: e5c4c000 strb r12, [r4] dfc: e28dd008 add sp, sp, #8 e00: e8bd8070 ldmia sp!, {r4, r5, r6, pc} ; literal pool e04: 00800504 e08: 00001fe8 e0c: 008000f8 e10: 0080050c e14: 008000f0 e18: 0080073c e1c: 0007f8c3 e20: 000fffff e24: 008000f4 e28: 00800514 ; 0xe2c routine matches C035 version e2c: e92d4070 stmdb sp!, {r4, r5, r6, lr} e30: e5dd5010 ldrb r5, [sp, #16] ; 0x10 e34: e59fc48c ldr r12, =0xffff ; via 0x12c8 e38: e59f4484 ldr r4, =0xfffffa08 ; via 0x12c4 e3c: e1c4c0b0 strh r12, [r4] e40: e59f4484 ldr r4, =0xfffffa0a ; via 0x12cc e44: e1c4c0b0 strh r12, [r4] e48: e59f4480 ldr r4, =0xfffff804 ; via 0x12d0 e4c: e3a0c0f5 mov r12, #245 ; 0xf5 e50: e1c4c0b0 strh r12, [r4] e54: e3a0c0a0 mov r12, #160 ; 0xa0 e58: e1c4c0b0 strh r12, [r4] e5c: e59f4470 ldr r4, =0xfffffb10 ; via 0x12d4 e60: e3a0cc01 mov r12, #256 ; 0x100 e64: e1c4c0b0 strh r12, [r4] e68: e59f6468 ldr r6, =0xfffffd00 ; via 0x12d8 e6c: e3a04b01 mov r4, #1024 ; 0x400 e70: e3a0c801 mov r12, #65536 ; 0x10000 e74: e24cc0de sub r12, r12, #222 ; 0xde e78: e106c0b4 strh r12, [r6, -r4] e7c: e59fc45c ldr r12, =0x2002 ; via 0x12e0 e80: e59f4454 ldr r4, =0xffff9800 ; via 0x12dc e84: e1c4c0b0 strh r12, [r4] e88: e1b04f8c movs r4, r12, lsl #31 e8c: 1afffffd bne 0xe88 e90: e3a0c083 mov r12, #131 ; 0x83 e94: e28cca01 add r12, r12, #4096 ; 0x1000 e98: e1c6c0b0 strh r12, [r6] e9c: e1d6c0b2 ldrh r12, [r6, #2] ea0: e20c40bf and r4, r12, #191 ; 0xbf ea4: e20cccff and r12, r12, #65280 ; 0xff00 ea8: e184c00c orr r12, r4, r12 eac: e1c6c0b2 strh r12, [r6, #2] eb0: e3a0cc02 mov r12, #512 ; 0x200 eb4: e200001f and r0, r0, #31 ; 0x1f eb8: e3800e2a orr r0, r0, #672 ; 0x2a0 ebc: e10600bc strh r0, [r6, -r12] ec0: e3a0cf7d mov r12, #500 ; 0x1f4 ec4: e201001f and r0, r1, #31 ; 0x1f ec8: e38000c0 orr r0, r0, #192 ; 0xc0 ecc: e10600bc strh r0, [r6, -r12] ed0: e3a0cf7e mov r12, #504 ; 0x1f8 ed4: e202001f and r0, r2, #31 ; 0x1f ed8: e38000c0 orr r0, r0, #192 ; 0xc0 edc: e10600bc strh r0, [r6, -r12] ee0: e3a0cb01 mov r12, #1024 ; 0x400 ee4: e1830205 orr r0, r3, r5, lsl #4 ee8: e3800cff orr r0, r0, #65280 ; 0xff00 eec: e10600bc strh r0, [r6, -r12] ef0: e8bd8070 ldmia sp!, {r4, r5, r6, pc} ; 0xef4 routine matches C035 version ef4: e92d4070 stmdb sp!, {r4, r5, r6, lr} ef8: e59fc3e4 ldr r12, =0xfffff900 ; via 0x12e4 efc: e1dc40b0 ldrh r4, [r12] f00: e59f33d0 ldr r3, =0xfffffd00 ; via 0x12d8 f04: e3a05b01 mov r5, #1024 ; 0x400 f08: e3a0c801 mov r12, #65536 ; 0x10000 f0c: e24cc0de sub r12, r12, #222 ; 0xde f10: e103c0b5 strh r12, [r3, -r5] f14: e59f63c0 ldr r6, =0xffff9800 ; via 0x12dc f18: e59fc3c0 ldr r12, =0x2002 ; via 0x12e0 f1c: e1c6c0b0 strh r12, [r6] f20: e1b05f8c movs r5, r12, lsl #31 f24: 1afffffd bne 0xf20 f28: e181c102 orr r12, r1, r2, lsl #2 f2c: e1a0c28c mov r12, r12, lsl #5 f30: e38cc002 orr r12, r12, #2 f34: e38cca02 orr r12, r12, #8192 ; 0x2000 f38: e1c6c0b0 strh r12, [r6] f3c: e3500001 cmp r0, #1 f40: 0a000009 beq 0xf6c f44: e3500000 cmp r0, #0 f48: 1a000006 bne 0xf68 f4c: e1d3c0b2 ldrh r12, [r3, #2] f50: e38cc040 orr r12, r12, #64 ; 0x40 f54: e1c3c0b2 strh r12, [r3, #2] f58: e3a0c0a1 mov r12, #161 ; 0xa1 f5c: e28cca01 add r12, r12, #4096 ; 0x1000 f60: e1c3c0b0 strh r12, [r3] f64: ea000008 b 0xf8c f68: eafffffe b 0xf68 f6c: e1d3c0b2 ldrh r12, [r3, #2] f70: e20c00bf and r0, r12, #191 ; 0xbf f74: e20cccff and r12, r12, #65280 ; 0xff00 f78: e180c00c orr r12, r0, r12 f7c: e1c3c0b2 strh r12, [r3, #2] f80: e3a0c081 mov r12, #129 ; 0x81 f84: e28cca01 add r12, r12, #4096 ; 0x1000 f88: e1c3c0b0 strh r12, [r3] f8c: e1d6c0b0 ldrh r12, [r6] f90: e38cc010 orr r12, r12, #16 ; 0x10 f94: e1a0c80c mov r12, r12, lsl #16 f98: e1a0c82c mov r12, r12, lsr #16 f9c: e1c6c0b0 strh r12, [r6] fa0: e1b00f8c movs r0, r12, lsl #31 fa4: 1afffffd bne 0xfa0 fa8: e3a0cb01 mov r12, #1024 ; 0x400 fac: e10340bc strh r4, [r3, -r12] fb0: e8bd8070 ldmia sp!, {r4, r5, r6, pc} ; 0xfb4 routine matches C035 version except for different var location fb4: e3a0c0ff mov r12, #255 ; 0xff fb8: e5c0c000 strb r12, [r0] fbc: e59fc324 ldr r12, =0xffff5000 ; via 0x12e8 fc0: e5dc2805 ldrb r2, [r12, #2053] ; 0x805 fc4: e1b02f82 movs r2, r2, lsl #31 fc8: 1a000001 bne 0xfd4 fcc: e3a02000 mov r2, #0 fd0: ea000003 b 0xfe4 fd4: e5dc2800 ldrb r2, [r12, #2048] ; 0x800 fd8: e352003c cmp r2, #60 ; 0x3c fdc: 0a000024 beq 0x1074 fe0: e3a02001 mov r2, #1 fe4: e5dc3005 ldrb r3, [r12, #5] fe8: e1b03f83 movs r3, r3, lsl #31 fec: 1a000002 bne 0xffc ff0: e3520001 cmp r2, #1 ff4: 0a000003 beq 0x1008 ff8: ea000015 b 0x1054 ffc: e5dcc000 ldrb r12, [r12] 1000: e35c003c cmp r12, #60 ; 0x3c 1004: 0a000017 beq 0x1068 ; 0x8005a8 var in this version seems to correspond to 0x800534 in C035 1008: e59fc2dc ldr r12, =0x8005a8 ; via 0x12ec 100c: e5dc0000 ldrb r0, [r12] 1010: e3500000 cmp r0, #0 1014: 1a000008 bne 0x103c 1018: e3a00001 mov r0, #1 101c: e5cc0000 strb r0, [r12] 1020: e59f02c8 ldr r0, =0xfffffd02 ; via 0x12f0 1024: e1d0c0b0 ldrh r12, [r0] 1028: e20c20bf and r2, r12, #191 ; 0xbf 102c: e20cccff and r12, r12, #65280 ; 0xff00 1030: e182c00c orr r12, r2, r12 1034: e1c0c0b0 strh r12, [r0] 1038: ea000005 b 0x1054 103c: e3a00000 mov r0, #0 1040: e5cc0000 strb r0, [r12] 1044: e59fc2a4 ldr r12, =0xfffffd02 ; via 0x12f0 1048: e1dc00b0 ldrh r0, [r12] 104c: e3800040 orr r0, r0, #64 ; 0x40 1050: e1cc00b0 strh r0, [r12] 1054: e59fc290 ldr r12, =0x8005a8 ; via 0x12ec 1058: e5dcc000 ldrb r12, [r12] 105c: e5c1c000 strb r12, [r1] 1060: e3a00000 mov r0, #0 1064: e12fff1e bx lr 1068: e3a0c001 mov r12, #1 106c: e5c0c000 strb r12, [r0] 1070: ea000001 b 0x107c 1074: e3a0c000 mov r12, #0 1078: e5c0c000 strb r12, [r0] 107c: e59fc268 ldr r12, =0x8005a8 ; via 0x12ec 1080: e5dcc000 ldrb r12, [r12] 1084: e5c1c000 strb r12, [r1] 1088: e3a00001 mov r0, #1 108c: e12fff1e bx lr ; 0x1090 routine matches C035 version 1090: e92d4070 stmdb sp!, {r4, r5, r6, lr} 1094: e24dd00c sub sp, sp, #12 ; 0xc 1098: e1a05000 mov r5, r0 109c: e59f4250 ldr r4, =0x800504 ; via 0x12f4 10a0: e2846008 add r6, r4, #8 10a4: e3a0c000 mov r12, #0 10a8: e5cdc008 strb r12, [sp, #8] 10ac: e3550000 cmp r5, #0 10b0: 1a000009 bne 0x10dc 10b4: e59f123c ldr r1, =0x800510 ; via 0x12f8 10b8: e1a00006 mov r0, r6 10bc: ebffffbc bl 0xfb4 10c0: e3500001 cmp r0, #1 10c4: 1a000004 bne 0x10dc 10c8: e5d4000c ldrb r0, [r4, #12] ; 0xc 10cc: e3a01001 mov r1, #1 10d0: e3a02002 mov r2, #2 10d4: ebffff86 bl 0xef4 10d8: ea000001 b 0x10e4 10dc: e3550001 cmp r5, #1 10e0: 1afffff1 bne 0x10ac 10e4: e28d0008 add r0, sp, #8 10e8: ebfffc76 bl 0x2c8 10ec: e5ddc008 ldrb r12, [sp, #8] 10f0: e35c0000 cmp r12, #0 10f4: 0a00000d beq 0x1130 10f8: e5dd0008 ldrb r0, [sp, #8] 10fc: ebfffdec bl 0x8b4 1100: ea00000a b 0x1130 1104: e5d4000c ldrb r0, [r4, #12] ; 0xc 1108: e3a01001 mov r1, #1 110c: e3a02002 mov r2, #2 1110: ebffff77 bl 0xef4 1114: e3a0c002 mov r12, #2 1118: e5cdc000 strb r12, [sp] 111c: e3a00004 mov r0, #4 1120: e3a01000 mov r1, #0 1124: e3a02000 mov r2, #0 1128: e3a03002 mov r3, #2 112c: ebffff3e bl 0xe2c 1130: e5d40008 ldrb r0, [r4, #8] 1134: e59fc1c0 ldr r12, =0x8000f0 ; via 0x12fc 1138: e59c1000 ldr r1, [r12] 113c: e28d2009 add r2, sp, #9 1140: eb0000b8 bl 0x1428 1144: e3500001 cmp r0, #1 1148: 1afffff8 bne 0x1130 114c: e5ddc009 ldrb r12, [sp, #9] 1150: e35c003c cmp r12, #60 ; 0x3c 1154: 1afffff5 bne 0x1130 1158: e28d0008 add r0, sp, #8 115c: ebfffc59 bl 0x2c8 1160: e3500001 cmp r0, #1 1164: 1affffe6 bne 0x1104 1168: e5ddc008 ldrb r12, [sp, #8] 116c: e35c0000 cmp r12, #0 1170: 1affffe0 bne 0x10f8 1174: eaffffed b 0x1130 ; 0x1178 routine matches C035 version 1178: e3a0ca02 mov r12, #8192 ; 0x2000 117c: e59cc000 ldr r12, [r12] 1180: e35c0000 cmp r12, #0 1184: 0a000011 beq 0x11d0 1188: e35c0001 cmp r12, #1 118c: 1a00000d bne 0x11c8 1190: e3a0c018 mov r12, #24 ; 0x18 1194: e28cc403 add r12, r12, #50331648 ; 0x3000000 1198: e59cc000 ldr r12, [r12] 119c: e20c04ff and r0, r12, #4278190080 ; 0xff000000 11a0: e3700416 cmn r0, #369098752 ; 0x16000000 11a4: 1a000007 bne 0x11c8 11a8: e3a00018 mov r0, #24 ; 0x18 11ac: e2800403 add r0, r0, #50331648 ; 0x3000000 11b0: e28cc002 add r12, r12, #2 11b4: e1a0c10c mov r12, r12, lsl #2 11b8: e3ccc4ff bic r12, r12, #4278190080 ; 0xff000000 11bc: e790c00c ldr r12, [r0, r12] 11c0: e37c0001 cmn r12, #1 11c4: 1a000001 bne 0x11d0 11c8: e3a00000 mov r0, #0 11cc: e1a0f00e mov pc, lr 11d0: e3a00001 mov r0, #1 11d4: e1a0f00e mov pc, lr ; 0x11d8 (main) routine matches C035 version 11d8: e92d4070 stmdb sp!, {r4, r5, r6, lr} 11dc: e24dd008 sub sp, sp, #8 11e0: e3a0c002 mov r12, #2 11e4: e5cdc000 strb r12, [sp] 11e8: e3a00004 mov r0, #4 11ec: e3a01000 mov r1, #0 11f0: e3a02000 mov r2, #0 11f4: e3a03002 mov r3, #2 11f8: ebffff0b bl 0xe2c 11fc: eb00004f bl 0x1340 1200: e59f00f4 ldr r0, =0x8000f0 ; via 0x12fc 1204: e3a0c802 mov r12, #131072 ; 0x20000 1208: e24ccdad sub r12, r12, #11072 ; 0x2b40 120c: e580c000 str r12, [r0] 1210: e59f60d8 ldr r6, =0xfffffd02 ; via 0x12f0 1214: e1d6c0b0 ldrh r12, [r6] 1218: e38cc040 orr r12, r12, #64 ; 0x40 121c: e1c6c0b0 strh r12, [r6] 1220: ebffffd4 bl 0x1178 1224: e3500000 cmp r0, #0 1228: 1a000001 bne 0x1234 122c: e3a00000 mov r0, #0 1230: ebffff96 bl 0x1090 1234: e1d6c0b0 ldrh r12, [r6] 1238: e38cc040 orr r12, r12, #64 ; 0x40 123c: e1c6c0b0 strh r12, [r6] 1240: e59f10b0 ldr r1, =0x800510 ; via 0x12f8 1244: e2415004 sub r5, r1, #4 1248: e59f40b0 ldr r4, =0x373c ; via 0x1300 124c: e1a00005 mov r0, r5 1250: ebffff57 bl 0xfb4 1254: e3500000 cmp r0, #0 1258: 1a000001 bne 0x1264 125c: e2544001 subs r4, r4, #1 1260: 1afffff9 bne 0x124c 1264: e3500001 cmp r0, #1 1268: 0a00000c beq 0x12a0 126c: e1d6c0b0 ldrh r12, [r6] 1270: e20c00bf and r0, r12, #191 ; 0xbf 1274: e20cccff and r12, r12, #65280 ; 0xff00 1278: e180c00c orr r12, r0, r12 127c: e1c6c0b0 strh r12, [r6] 1280: e3a0ca02 mov r12, #8192 ; 0x2000 1284: e59c0000 ldr r0, [r12] 1288: e1b010a0 movs r1, r0, lsr #1 128c: 1a000002 bne 0x129c 1290: e59c1004 ldr r1, [r12, #4] 1294: eb0000d2 bl 0x15e4 ; 0x158c in C035 1298: eafffffe b 0x1298 129c: eafffffe b 0x129c 12a0: e59fc050 ldr r12, =0x800510 ; via 0x12f8 12a4: e5dc0000 ldrb r0, [r12] 12a8: e3a01001 mov r1, #1 12ac: e3a02002 mov r2, #2 12b0: ebffff0f bl 0xef4 12b4: e3a00001 mov r0, #1 12b8: ebffff74 bl 0x1090 12bc: e28dd008 add sp, sp, #8 12c0: e8bd8070 ldmia sp!, {r4, r5, r6, pc} ; literal pool 12c4: fffffa08 12c8: 0000ffff 12cc: fffffa0a 12d0: fffff804 12d4: fffffb10 12d8: fffffd00 12dc: ffff9800 12e0: 00002002 12e4: fffff900 12e8: ffff5000 12ec: 008005a8 12f0: fffffd02 12f4: 00800504 12f8: 00800510 12fc: 008000f0 1300: 0000373c ; 0x1304 routine matches C035 version 1304: e3510000 cmp r1, #0 1308: 012fff1e bxeq lr 130c: e59fc178 ldr r12, =0x1fe8 ; via 0x148c 1310: e79cc102 ldr r12, [r12, r2, lsl #2] 1314: e28c3005 add r3, r12, #5 1318: e5d32000 ldrb r2, [r3] 131c: e3120020 tst r2, #32 ; 0x20 1320: 0afffffc beq 0x1318 1324: e4d02001 ldrb r2, [r0], #1 1328: e5cc2000 strb r2, [r12] 132c: e2411001 sub r1, r1, #1 1330: e1a01801 mov r1, r1, lsl #16 1334: e1b01821 movs r1, r1, lsr #16 1338: 1afffff6 bne 0x1318 133c: e12fff1e bx lr ; 0x1340 routine matches C035 version 1340: e92d4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} 1344: e59fc144 ldr r12, =0xffff6000 ; via 0x1490 1348: e5dc0000 ldrb r0, [r12] 134c: e3800002 orr r0, r0, #2 1350: e5cc0000 strb r0, [r12] 1354: e5dc0000 ldrb r0, [r12] 1358: e20000fe and r0, r0, #254 ; 0xfe 135c: e5cc0000 strb r0, [r12] 1360: e5dc0000 ldrb r0, [r12] 1364: e20000fd and r0, r0, #253 ; 0xfd 1368: e5cc0000 strb r0, [r12] 136c: e3a0b003 mov r11, #3 1370: e3a05000 mov r5, #0 1374: e3a0a02a mov r10, #42 ; 0x2a 1378: e3a09080 mov r9, #128 ; 0x80 137c: e3a070bf mov r7, #191 ; 0xbf 1380: e3a04007 mov r4, #7 1384: e3a02002 mov r2, #2 1388: e59f60fc ldr r6, =0x1fe8 ; via 0x148c 138c: e496c004 ldr r12, [r6], #4 1390: e28c3008 add r3, r12, #8 1394: e5c34000 strb r4, [r3] 1398: e28c0003 add r0, r12, #3 139c: e5c07000 strb r7, [r0] 13a0: e28c1002 add r1, r12, #2 13a4: e5d18000 ldrb r8, [r1] 13a8: e3888010 orr r8, r8, #16 ; 0x10 13ac: e5c18000 strb r8, [r1] 13b0: e5c09000 strb r9, [r0] 13b4: e5c14000 strb r4, [r1] 13b8: e5c07000 strb r7, [r0] 13bc: e5cca000 strb r10, [r12] 13c0: e5cc5001 strb r5, [r12, #1] 13c4: e5c0b000 strb r11, [r0] 13c8: e5c35000 strb r5, [r3] 13cc: e2522001 subs r2, r2, #1 13d0: 1affffed bne 0x138c 13d4: e8bd8ff0 ldmia sp!, {r4, r5, r6, r7, r8, r9, r10, r11, pc} ; 0x13d8 routine matches C035 version 13d8: e59fc0ac ldr r12, =0x1fe8 ; via 0x148c 13dc: e79c2101 ldr r2, [r12, r1, lsl #2] 13e0: e282c005 add r12, r2, #5 13e4: e5dc1000 ldrb r1, [r12] 13e8: e3110040 tst r1, #64 ; 0x40 13ec: 0afffffc beq 0x13e4 13f0: e282c003 add r12, r2, #3 13f4: e5dc1000 ldrb r1, [r12] 13f8: e3811080 orr r1, r1, #128 ; 0x80 13fc: e5cc1000 strb r1, [r12] 1400: e59f108c ldr r1, =0x1ff0 ; via 0x1494 1404: e7d13080 ldrb r3, [r1, r0, lsl #1] 1408: e5c23001 strb r3, [r2, #1] 140c: e0810080 add r0, r1, r0, lsl #1 1410: e5d00001 ldrb r0, [r0, #1] 1414: e5c20000 strb r0, [r2] 1418: e5dc0000 ldrb r0, [r12] 141c: e200007f and r0, r0, #127 ; 0x7f 1420: e5cc0000 strb r0, [r12] 1424: e12fff1e bx lr ; 0x1428 routine matches C035 version 1428: e3510000 cmp r1, #0 142c: 1a000006 bne 0x144c 1430: e59fc054 ldr r12, =0x1fe8 ; via 0x148c 1434: e79cc100 ldr r12, [r12, r0, lsl #2] 1438: e28c1005 add r1, r12, #5 143c: e5d10000 ldrb r0, [r1] 1440: e1b00f80 movs r0, r0, lsl #31 1444: 0afffffc beq 0x143c 1448: ea000009 b 0x1474 144c: e59fc038 ldr r12, =0x1fe8 ; via 0x148c 1450: e79cc100 ldr r12, [r12, r0, lsl #2] 1454: e28c3005 add r3, r12, #5 1458: e5d30000 ldrb r0, [r3] 145c: e1b00f80 movs r0, r0, lsl #31 1460: 1a000001 bne 0x146c 1464: e2511001 subs r1, r1, #1 1468: 1afffffa bne 0x1458 146c: e3510000 cmp r1, #0 1470: 0a000003 beq 0x1484 1474: e5dcc000 ldrb r12, [r12] 1478: e5c2c000 strb r12, [r2] 147c: e3a00001 mov r0, #1 1480: e12fff1e bx lr 1484: e3a00000 mov r0, #0 1488: e12fff1e bx lr ; literal pool 148c: 00001fe8 1490: ffff6000 1494: 00001ff0 ; Real differences from the C035 version begin here 1498: eafffffe b 0x1498 149c: eafffffe b 0x149c 14a0: eafffffe b 0x14a0 14a4: eafffffe b 0x14a4 14a8: eafffffe b 0x14a8 14ac: eafffffe b 0x14ac 14b0: eafffffe b 0x14b0 ; Bogus interrupt/exception handlers 14b4: e92d4010 stmdb sp!, {r4, lr} 14b8: e59fc080 ldr r12, =0x800000 ; via 0x1540 14bc: e59c4000 ldr r4, [r12] 14c0: eb00009a bl 0x1730 14c4: e8bd8010 ldmia sp!, {r4, pc} 14c8: e92d4010 stmdb sp!, {r4, lr} 14cc: e59fc070 ldr r12, =0x800004 ; via 0x1544 14d0: e59c4000 ldr r4, [r12] 14d4: eb000095 bl 0x1730 14d8: e8bd8010 ldmia sp!, {r4, pc} 14dc: e92d4010 stmdb sp!, {r4, lr} 14e0: e59fc060 ldr r12, =0x800008 ; via 0x1548 14e4: e59c4000 ldr r4, [r12] 14e8: eb000090 bl 0x1730 14ec: e8bd8010 ldmia sp!, {r4, pc} 14f0: e92d4010 stmdb sp!, {r4, lr} 14f4: e59fc050 ldr r12, =0x80000c ; via 0x154c 14f8: e59c4000 ldr r4, [r12] 14fc: eb00008b bl 0x1730 1500: e8bd8010 ldmia sp!, {r4, pc} 1504: e92d4010 stmdb sp!, {r4, lr} 1508: e59fc040 ldr r12, =0x800010 ; via 0x1550 150c: e59c4000 ldr r4, [r12] 1510: eb000086 bl 0x1730 1514: e8bd8010 ldmia sp!, {r4, pc} 1518: e92d4010 stmdb sp!, {r4, lr} 151c: e59fc030 ldr r12, =0x800014 ; via 0x1554 1520: e59c4000 ldr r4, [r12] 1524: eb000081 bl 0x1730 1528: e8bd8010 ldmia sp!, {r4, pc} 152c: e92d4010 stmdb sp!, {r4, lr} 1530: e59fc020 ldr r12, =0x800018 ; via 0x1558 1534: e59c4000 ldr r4, [r12] 1538: eb00007c bl 0x1730 153c: e8bd8010 ldmia sp!, {r4, pc} ; literal pool for the above bogosity 1540: 00800000 1544: 00800004 1548: 00800008 154c: 0080000c 1550: 00800010 1554: 00800014 1558: 00800018 ; RESET entry continues here right after setting SP ; the STUPID switch to user mode happens here 155c: e10f0000 mrs r0, CPSR 1560: e3c0001f bic r0, r0, #31 ; 0x1f 1564: e3800010 orr r0, r0, #16 ; 0x10 1568: e129f000 msr CPSR_fc, r0 156c: e28f0001 add r0, pc, #1 1570: e12fff10 bx r0 1574: 4818 ldr r0, =0x8005ac ; via 0x15d8 1576: 4685 mov sp, r0 1578: 4818 ldr r0, =0x190 ; via 0x15dc 157a: 4485 add sp, r0 157c: 4818 ldr r0, =0x1794 ; via 0x15e0 157e: 2101 mov r1, #1 1580: 42c8 cmn r0, r1 1582: d001 beq 0x1588 1584: f000 f806 bl 0x1594 ; "auto init" 1588: f000 f8f0 bl 0x176c ; main() ; the following is a call to some "post-main" function ; which became a tight loop (b .) in the C035 version 158c: 2001 mov r0, #1 158e: f000 f867 bl 0x1660 1592: e7fe b 0x1592 ; Thumb version of TI's "auto init" function 1594: 2503 mov r5, #3 1596: e01a b 0x15ce 1598: 6841 ldr r1, [r0, #4] 159a: 3008 add r0, #8 159c: 4229 tst r1, r5 159e: d10c bne 0x15ba 15a0: 1c1a add r2, r3, #0 15a2: 43aa bic r2, r5 15a4: d009 beq 0x15ba 15a6: 1f12 sub r2, r2, #4 15a8: 5884 ldr r4, [r0, r2] 15aa: 508c str r4, [r1, r2] 15ac: d1fb bne 0x15a6 15ae: 1c1a add r2, r3, #0 15b0: 43aa bic r2, r5 15b2: 1880 add r0, r0, r2 15b4: 402b and r3, r5 15b6: d006 beq 0x15c6 15b8: 1889 add r1, r1, r2 15ba: 1c1a add r2, r3, #0 15bc: 1e52 sub r2, r2, #1 15be: 5c84 ldrb r4, [r0, r2] 15c0: 548c strb r4, [r1, r2] 15c2: d1fb bne 0x15bc 15c4: 18c0 add r0, r0, r3 15c6: 4228 tst r0, r5 15c8: d001 beq 0x15ce 15ca: 43a8 bic r0, r5 15cc: 3004 add r0, #4 15ce: 6803 ldr r3, [r0, #0] 15d0: 2b00 cmp r3, #0 15d2: d1e1 bne 0x1598 15d4: 46f7 mov pc, lr 15d6: 0000 ; literal pool 15d8: 008005ac 15dc: 00000190 15e0: 00001794 ; Routine corresponds to 0x158c in C035 version 15e4: e92d4010 stmdb sp!, {r4, lr} 15e8: e1a04000 mov r4, r0 15ec: e1b0c0a4 movs r12, r4, lsr #1 15f0: 0a000001 beq 0x15fc 15f4: e3a00001 mov r0, #1 15f8: e8bd8010 ldmia sp!, {r4, pc} 15fc: e59f0054 ldr r0, =0xfffffb10 ; via 0x1658 1600: e1d0c0b0 ldrh r12, [r0] 1604: e20c20ff and r2, r12, #255 ; 0xff 1608: e20ccb3f and r12, r12, #64512 ; 0xfc00 160c: e182c00c orr r12, r2, r12 1610: e1a0c80c mov r12, r12, lsl #16 1614: e1a0c82c mov r12, r12, lsr #16 1618: e3540000 cmp r4, #0 161c: 1a000004 bne 0x1634 1620: e38ccc01 orr r12, r12, #256 ; 0x100 1624: e1c0c0b0 strh r12, [r0] 1628: e1a04001 mov r4, r1 162c: eb00003f bl 0x1730 1630: e8bd8010 ldmia sp!, {r4, pc} 1634: e3540001 cmp r4, #1 1638: 18bd8010 ldmneia sp!, {r4, pc} 163c: e3a00020 mov r0, #32 ; 0x20 1640: e3a010cc mov r1, #204 ; 0xcc 1644: e59f2010 ldr r2, =0x800020 ; via 0x165c 1648: eb000040 bl 0x1750 164c: e1a00004 mov r0, r4 1650: eb1ffa72 bl 0x800020 1654: e8bd8010 ldmia sp!, {r4, pc} ; literal pool 1658: fffffb10 165c: 00800020 ; this weird function would gain control if main() returned ; it seems to be an exit() implementation that does atexit processing 1660: b570 push {r4, r5, r6, lr} 1662: 4812 ldr r0, =0x800520 ; via 0x16ac 1664: 6806 ldr r6, [r0, #0] 1666: 2e00 cmp r6, #0 1668: d009 beq 0x167e 166a: 4911 ldr r1, =0x800528 ; via 0x16b0 166c: 00b0 lsl r0, r6, #2 166e: 180d add r5, r1, r0 1670: 3d04 sub r5, #4 1672: 682c ldr r4, [r5, #0] 1674: f000 f884 bl 0x1780 1678: 3e01 sub r6, #1 167a: 2e00 cmp r6, #0 167c: d1f8 bne 0x1670 167e: 480d ldr r0, =0x800524 ; via 0x16b4 1680: 6804 ldr r4, [r0, #0] 1682: 2c00 cmp r4, #0 1684: d001 beq 0x168a 1686: f000 f87b bl 0x1780 168a: 46c0 nop (mov r8, r8) 168c: e7fe b 0x168c ; appears to be atexit(), never called 168e: b510 push {r4, lr} 1690: 4a06 ldr r2, =0x800520 ; via 0x16ac 1692: 6811 ldr r1, [r2, #0] 1694: 2920 cmp r1, #32 ; 0x20 1696: db01 blt 0x169c 1698: 2001 mov r0, #1 169a: bd10 pop {r4, pc} 169c: 4c04 ldr r4, =0x800528 ; via 0x16b0 169e: 008b lsl r3, r1, #2 16a0: 50e0 str r0, [r4, r3] 16a2: 1c48 add r0, r1, #1 16a4: 6010 str r0, [r2, #0] 16a6: 2000 mov r0, #0 16a8: bd10 pop {r4, pc} 16aa: e7fe b 0x16aa ; literal pool 16ac: 00800520 16b0: 00800528 16b4: 00800524 ; Checksum function listed in CAL228 document 16b8: e92d4000 stmdb sp!, {lr} 16bc: e24dd008 sub sp, sp, #8 16c0: e3500001 cmp r0, #1 16c4: 1a000006 bne 0x16e4 16c8: e3a0c002 mov r12, #2 16cc: e5cdc000 strb r12, [sp] 16d0: e3a00004 mov r0, #4 16d4: e3a01000 mov r1, #0 16d8: e3a02000 mov r2, #0 16dc: e3a03002 mov r3, #2 16e0: ebfffdd1 bl 0xe2c 16e4: e3a00000 mov r0, #0 16e8: e3a0c000 mov r12, #0 16ec: e0dc10b2 ldrh r1, [r12], #2 16f0: e0810000 add r0, r1, r0 16f4: e1a00800 mov r0, r0, lsl #16 16f8: e1a00820 mov r0, r0, lsr #16 16fc: e35c0a02 cmp r12, #8192 ; 0x2000 1700: 3afffff9 bcc 0x16ec 1704: e28dd008 add sp, sp, #8 1708: e8bd8000 ldmia sp!, {pc} ; RESET entry point jumps here 170c: e59f0014 ldr r0, =0x8005ac ; via 0x1728 1710: e59f1014 ldr r1, =0x190 ; via 0x172c 1714: e2411004 sub r1, r1, #4 1718: e0802001 add r2, r0, r1 171c: e3c22003 bic r2, r2, #3 1720: e1a0d002 mov sp, r2 1724: eaffff8c b 0x155c ; literal pool 1728: 008005ac 172c: 00000190 ; TI compiler's IND_CALL library helper 1730: e3140001 tst r4, #1 1734: 1a000000 bne 0x173c 1738: e12fff14 bx r4 173c: e1a0c004 mov r12, r4 1740: e1a0400e mov r4, lr 1744: e28fe001 add lr, pc, #1 1748: e12fff1c bx r12 174c: 4720 bx r4 174e: 46c0 nop (mov r8, r8) ; memory copy function like 0x165c in the C035 version 1750: e3510000 cmp r1, #0 1754: 012fff1e bxeq lr 1758: e490c004 ldr r12, [r0], #4 175c: e482c004 str r12, [r2], #4 1760: e2511004 subs r1, r1, #4 1764: 1afffffb bne 0x1758 1768: e12fff1e bx lr ; Thumb->ARM call veneer for the main() function 176c: 4778 bx pc 176e: 46c0 nop (mov r8, r8) 1770: e92d4000 stmdb sp!, {lr} 1774: ebfffe97 bl 0x11d8 1778: e8bd4000 ldmia sp!, {lr} 177c: e12fff1e bx lr ; TI compiler's IND$CALL library helper 1780: 46a4 mov r12, r4 1782: 0864 lsr r4, r4, #1 1784: d301 bcc 0x178a 1786: 4760 bx r12 1788: 46c0 nop (mov r8, r8) 178a: 4674 mov r4, lr 178c: 46fe mov lr, pc 178e: 4760 bx r12 1790: e12fff14 bx r4 ; "auto init" table (.cinit section) 1794: 0000001c 1798: 00800000 179c: 00001498 17a0: 0000149c 17a4: 000014a0 17a8: 000014a4 17ac: 000014a8 17b0: 000014ac 17b4: 000014b0 17b8: 00000004 17bc: 008000f0 17c0: 0001d4c0 17c4: 00000001 17c8: 008000f4 17cc: 00000001 17d0: 00000004 17d4: 00800520 17d8: 00000000 17dc: 00000004 17e0: 00800524 17e4: 00000000 17e8: 00000001 17ec: 008005a8 17f0: 00000000 17f4: 00000000 ; filler 000017F0: 00 00 00 00 00 00 00 00 F0 EF EE ED EC EB EA E9 ................ 00001800: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001810: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001820: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001830: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001840: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001850: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001860: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001870: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001880: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001890: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 000018A0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 000018B0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 000018C0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 000018D0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 000018E0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 000018F0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001900: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001910: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001920: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001930: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001940: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001950: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001960: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001970: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001980: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001990: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 000019A0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 000019B0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 000019C0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 000019D0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 000019E0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 000019F0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001A00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001A10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001A20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001A30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001A40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001A50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001A60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001A70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001A80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001A90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001AA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001AB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001AC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001AD0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001AE0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 00001AF0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001B00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001B10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001B20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001B30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001B40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001B50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001B60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001B70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001B80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001B90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001BA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001BB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001BC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001BD0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001BE0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 00001BF0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001C00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001C10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001C20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001C30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001C40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001C50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001C60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001C70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001C80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001C90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001CA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001CB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001CC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001CD0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001CE0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 00001CF0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001D00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001D10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001D20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001D30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001D40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001D50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001D60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001D70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001D80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001D90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001DA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001DB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001DC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001DD0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001DE0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 00001DF0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001E00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001E10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001E20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001E30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001E40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001E50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001E60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001E70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001E80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001E90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001EA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001EB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001EC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001ED0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001EE0: 08 07 06 05 04 03 02 01 00 FF FE FD FC FB FA F9 ................ 00001EF0: F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 ................ 00001F00: E8 E7 E6 E5 E4 E3 E2 E1 E0 DF DE DD DC DB DA D9 ................ 00001F10: D8 D7 D6 D5 D4 D3 D2 D1 D0 CF CE CD CC CB CA C9 ................ 00001F20: C8 C7 C6 C5 C4 C3 C2 C1 C0 BF BE BD BC BB BA B9 ................ 00001F30: B8 B7 B6 B5 B4 B3 B2 B1 B0 AF AE AD AC AB AA A9 ................ 00001F40: A8 A7 A6 A5 A4 A3 A2 A1 A0 9F 9E 9D 9C 9B 9A 99 ................ 00001F50: 98 97 96 95 94 93 92 91 90 8F 8E 8D 8C 8B 8A 89 ................ 00001F60: 88 87 86 85 84 83 82 81 80 7F 7E 7D 7C 7B 7A 79 ..........~}|{zy 00001F70: 78 77 76 75 74 73 72 71 70 6F 6E 6D 6C 6B 6A 69 xwvutsrqponmlkji 00001F80: 68 67 66 65 64 63 62 61 60 5F 5E 5D 5C 5B 5A 59 hgfedcba`_^]\[ZY 00001F90: 58 57 56 55 54 53 52 51 50 4F 4E 4D 4C 4B 4A 49 XWVUTSRQPONMLKJI 00001FA0: 48 47 46 45 44 43 42 41 40 3F 3E 3D 3C 3B 3A 39 HGFEDCBA@?>=<;:9 00001FB0: 38 37 36 35 34 33 32 31 30 2F 2E 2D 2C 2B 2A 29 876543210/.-,+*) 00001FC0: 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 1A 19 ('&%$#"! ....... 00001FD0: 18 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 ................ 00001FE0: 08 07 06 05 04 03 02 01 00 58 FF FF 00 50 FF FF .........X...P.. 00001FF0: 00 07 00 0E 00 15 00 1C 00 2A 00 00 00 00 00 02 .........*...... ; base addresses of the two UARTs 1fe8: ffff5800 1fec: ffff5000 ; UART baud rates 1ff0: 0700 1ff2: 0e00 1ff4: 1500 1ff6: 1c00 1ff8: 2a00 1ffa: 0000 1ffc: 0000 ; Boot ROM version 1ffe: 0200