FreeCalypso > hg > freecalypso-reveng
comparison compal/boot/c118-dfboot.disasm @ 403:50c0fac9a4a8
compal/boot/c118-dfboot.disasm: new analysis
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jan 2023 00:54:33 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
402:1b83d07576bf | 403:50c0fac9a4a8 |
---|---|
1 ; In 2023-01 Mother Mychaela received a rare C118 phone with North American | |
2 ; frequency bands; this phone features a 2 MiB flash chip, but the flash- | |
3 ; resident bootloader version is one which we haven't seen before. The present | |
4 ; work is a disassembly analysis of this new-to-us Compal bootloader version | |
5 ; from fw version 2.2.84.N. | |
6 ; | |
7 ; Analysis result: this bootloader version is fatally hobbled: it NEVER offers | |
8 ; a serial download opportunity at all (the code is still there, but can never | |
9 ; be called), only the ftmtool flag mechanism. | |
10 | |
11 RESET entry and exception vectors: | |
12 0: ea000225 b 0x89c | |
13 4: ea000825 b 0x20a0 | |
14 8: ea000825 b 0x20a4 | |
15 c: ea000825 b 0x20a8 | |
16 10: ea000825 b 0x20ac | |
17 14: ea000825 b 0x20b0 | |
18 18: ea000825 b 0x20b4 | |
19 1c: ea000825 b 0x20b8 | |
20 | |
21 ; magic words? | |
22 20: 47033dc9 | |
23 24: 47033dca | |
24 28: 47033df9 | |
25 2c: 47033dfa | |
26 | |
27 <30-7FF: all FFs> | |
28 | |
29 00000800: 42 4F 4F 54 2E 39 30 2E 30 34 00 00 00 00 00 00 BOOT.90.04...... | |
30 00000810: 31 30 30 33 01 03 00 00 FF FF FF FF FF FF FF FF 1003............ | |
31 00000820: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ | |
32 | |
33 ; serial.obj .const section, matches familiar versions | |
34 830: 00000006 | |
35 834: 00000000 | |
36 838: 00000000 | |
37 83c: 00000048 | |
38 840: 00000044 | |
39 844: 00000052 | |
40 848: 0000001b | |
41 84c: 00000005 | |
42 850: 00000000 | |
43 854: 00000000 | |
44 858: 00000000 | |
45 85c: 00000000 | |
46 860: 000000fa | |
47 864: ffff5800 | |
48 868: ffff5000 | |
49 | |
50 ; bootloader.obj .text section, matches familiar versions | |
51 | |
52 86c: fffffb00 | |
53 870: 02a102a1 | |
54 874: 028302a1 | |
55 878: 00c00281 | |
56 87c: 002a0040 | |
57 880: 00000040 | |
58 884: fffffd00 | |
59 888: ffff9800 | |
60 88c: fffffb10 | |
61 890: ffffff08 | |
62 894: 20061081 | |
63 898: 00000800 | |
64 | |
65 _INT_Bootloader_Start: | |
66 89c: e51f1020 ldr r1, =0xfffffd00 ; via 0x884 | |
67 8a0: e1d120b2 ldrh r2, [r1, #2] | |
68 8a4: e51f002c ldr r0, =0x40 ; via 0x880 | |
69 8a8: e1800002 orr r0, r0, r2 | |
70 8ac: e1c100b2 strh r0, [r1, #2] | |
71 8b0: e51f1030 ldr r1, =0xffff9800 ; via 0x888 | |
72 8b4: e15f22b6 ldrh r2, =0x2006 ; via 0x896 | |
73 8b8: e1c120b0 strh r2, [r1] | |
74 8bc: e5912000 ldr r2, [r1] | |
75 8c0: e2022001 and r2, r2, #1 | |
76 8c4: e3520001 cmp r2, #1 | |
77 8c8: 0afffffb beq 0x8bc | |
78 8cc: e51f1050 ldr r1, =0xfffffd00 ; via 0x884 | |
79 8d0: e15f24b4 ldrh r2, =0x1081 ; via 0x894 | |
80 8d4: e1c120b0 strh r2, [r1] | |
81 8d8: e51f1054 ldr r1, =0xfffffb10 ; via 0x88c | |
82 8dc: e15f24bc ldrh r2, =0x800 ; via 0x898 | |
83 8e0: e1d100b0 ldrh r0, [r1] | |
84 8e4: e1800002 orr r0, r0, r2 | |
85 8e8: e1c100b0 strh r0, [r1] | |
86 8ec: e51f1064 ldr r1, =0xffffff08 ; via 0x890 | |
87 8f0: e15f25be ldrh r2, =0x0 ; via 0x89a | |
88 8f4: e1c120b0 strh r2, [r1] | |
89 8f8: e51f1094 ldr r1, =0xfffffb00 ; via 0x86c | |
90 8fc: e15f29b4 ldrh r2, =0x2a1 ; via 0x870 | |
91 900: e1c120b0 strh r2, [r1] | |
92 904: e15f29ba ldrh r2, =0x2a1 ; via 0x872 | |
93 908: e1c120b2 strh r2, [r1, #2] | |
94 90c: e15f2ab0 ldrh r2, =0x2a1 ; via 0x874 | |
95 910: e1c120b4 strh r2, [r1, #4] | |
96 914: e15f2ab6 ldrh r2, =0x283 ; via 0x876 | |
97 918: e1c120b6 strh r2, [r1, #6] | |
98 91c: e15f2abc ldrh r2, =0x281 ; via 0x878 | |
99 920: e1c120ba strh r2, [r1, #10] ; 0xa | |
100 924: e15f2bb2 ldrh r2, =0xc0 ; via 0x87a | |
101 928: e1c120bc strh r2, [r1, #12] ; 0xc | |
102 92c: e15f2bb8 ldrh r2, =0x40 ; via 0x87c | |
103 930: e1c120b8 strh r2, [r1, #8] | |
104 934: e15f2bbe ldrh r2, =0x2a ; via 0x87e | |
105 938: e1c120be strh r2, [r1, #14] ; 0xe | |
106 93c: e59f0020 ldr r0, =0x83e68c ; via 0x964 | |
107 940: e3a01b01 mov r1, #1024 ; 0x400 | |
108 944: e2411004 sub r1, r1, #4 | |
109 948: e0802001 add r2, r0, r1 | |
110 94c: e3c22003 bic r2, r2, #3 | |
111 950: e1a0d002 mov sp, r2 | |
112 954: e92d100f stmdb sp!, {r0, r1, r2, r3, r12} | |
113 958: eb00050c bl 0x1d90 ; _sta_select_application | |
114 95c: e8bd100f ldmia sp!, {r0, r1, r2, r3, r12} | |
115 960: ea0005e4 b 0x20f8 ; _INT_Initialize | |
116 964: 0083e68c | |
117 | |
118 ; start.obj .text section, matches familiar versions | |
119 | |
120 968: 4961 ldr r1, =0xfffffa08 ; via 0xaf0 | |
121 96a: 4862 ldr r0, =0xffff ; via 0xaf4 | |
122 96c: 8008 strh r0, [r1, #0] | |
123 96e: 4862 ldr r0, =0xfffffa0a ; via 0xaf8 | |
124 970: 211f mov r1, #31 ; 0x1f | |
125 972: 8001 strh r1, [r0, #0] | |
126 974: 4861 ldr r0, =0xfffff804 ; via 0xafc | |
127 976: 21f5 mov r1, #245 ; 0xf5 | |
128 978: 8001 strh r1, [r0, #0] | |
129 97a: 21a0 mov r1, #160 ; 0xa0 | |
130 97c: 8001 strh r1, [r0, #0] | |
131 97e: 4860 ldr r0, =0xffff9800 ; via 0xb00 | |
132 980: 4960 ldr r1, =0x2002 ; via 0xb04 | |
133 982: 8001 strh r1, [r0, #0] | |
134 984: 485e ldr r0, =0xffff9800 ; via 0xb00 | |
135 986: 8800 ldrh r0, [r0, #0] | |
136 988: 0840 lsr r0, r0, #1 | |
137 98a: d2fb bcs 0x984 | |
138 98c: 495e ldr r1, =0xfffffd00 ; via 0xb08 | |
139 98e: 485f ldr r0, =0x1001 ; via 0xb0c | |
140 990: 8008 strh r0, [r1, #0] | |
141 992: 46f7 mov pc, lr | |
142 | |
143 994: b500 push {lr} | |
144 996: b0ff sub sp, #508 ; 0x1fc | |
145 998: b0ca sub sp, #296 ; 0x128 | |
146 99a: 2000 mov r0, #0 | |
147 99c: 9001 str r0, [sp, #4] | |
148 99e: 9801 ldr r0, [sp, #4] | |
149 9a0: 2800 cmp r0, #0 | |
150 9a2: d14e bne 0xa42 | |
151 9a4: a846 add r0, sp, #280 ; 0x118 | |
152 9a6: 2100 mov r1, #0 | |
153 9a8: f001 f81e bl 0x19e8 | |
154 9ac: a9c8 add r1, sp, #800 ; 0x320 | |
155 9ae: 7008 strb r0, [r1, #0] | |
156 9b0: a846 add r0, sp, #280 ; 0x118 | |
157 9b2: a902 add r1, sp, #8 | |
158 9b4: f000 fadc bl 0xf70 | |
159 9b8: 9000 str r0, [sp, #0] | |
160 9ba: 9800 ldr r0, [sp, #0] | |
161 9bc: 2800 cmp r0, #0 | |
162 9be: d01b beq 0x9f8 | |
163 9c0: a924 add r1, sp, #144 ; 0x90 | |
164 9c2: 4668 mov r0, sp | |
165 9c4: 7a00 ldrb r0, [r0, #8] | |
166 9c6: 7008 strb r0, [r1, #0] | |
167 9c8: 2191 mov r1, #145 ; 0x91 | |
168 9ca: 466a mov r2, sp | |
169 9cc: 4668 mov r0, sp | |
170 9ce: 7800 ldrb r0, [r0, #0] | |
171 9d0: 5488 strb r0, [r1, r2] | |
172 9d2: e01b b 0xa0c | |
173 9d4: a802 add r0, sp, #8 | |
174 9d6: a924 add r1, sp, #144 ; 0x90 | |
175 9d8: f000 fdb8 bl 0x154c | |
176 9dc: e016 b 0xa0c | |
177 9de: a802 add r0, sp, #8 | |
178 9e0: a924 add r1, sp, #144 ; 0x90 | |
179 9e2: aac8 add r2, sp, #800 ; 0x320 | |
180 9e4: 7812 ldrb r2, [r2, #0] | |
181 9e6: f000 fdc5 bl 0x1574 | |
182 9ea: e00f b 0xa0c | |
183 9ec: a802 add r0, sp, #8 | |
184 9ee: a924 add r1, sp, #144 ; 0x90 | |
185 9f0: f000 fdf7 bl 0x15e2 | |
186 9f4: 90c7 str r0, [sp, #796] ; 0x31c | |
187 9f6: e009 b 0xa0c | |
188 9f8: 4668 mov r0, sp | |
189 9fa: 7a00 ldrb r0, [r0, #8] | |
190 9fc: 2800 cmp r0, #0 | |
191 9fe: d0e9 beq 0x9d4 | |
192 a00: 3809 sub r0, #9 | |
193 a02: 2800 cmp r0, #0 | |
194 a04: d0eb beq 0x9de | |
195 a06: 3801 sub r0, #1 | |
196 a08: 2800 cmp r0, #0 | |
197 a0a: d0ef beq 0x9ec | |
198 a0c: a824 add r0, sp, #144 ; 0x90 | |
199 a0e: a986 add r1, sp, #536 ; 0x218 | |
200 a10: f000 fb91 bl 0x1136 | |
201 a14: 2800 cmp r0, #0 | |
202 a16: d111 bne 0xa3c | |
203 a18: a886 add r0, sp, #536 ; 0x218 | |
204 a1a: a9c8 add r1, sp, #800 ; 0x320 | |
205 a1c: 7809 ldrb r1, [r1, #0] | |
206 a1e: f000 ffb8 bl 0x1992 | |
207 a22: 2800 cmp r0, #0 | |
208 a24: d00a beq 0xa3c | |
209 a26: 4668 mov r0, sp | |
210 a28: 7a00 ldrb r0, [r0, #8] | |
211 a2a: 280a cmp r0, #10 ; 0xa | |
212 a2c: d106 bne 0xa3c | |
213 a2e: a8c8 add r0, sp, #800 ; 0x320 | |
214 a30: 7800 ldrb r0, [r0, #0] | |
215 a32: f001 f909 bl 0x1c48 | |
216 a36: 98c7 ldr r0, [sp, #796] ; 0x31c | |
217 a38: f000 fa98 bl 0xf6c | |
218 a3c: 9801 ldr r0, [sp, #4] | |
219 a3e: 2800 cmp r0, #0 | |
220 a40: d0b0 beq 0x9a4 | |
221 a42: b07f add sp, #508 ; 0x1fc | |
222 a44: b04a add sp, #296 ; 0x128 | |
223 a46: bd00 pop {pc} | |
224 | |
225 a48: b500 push {lr} | |
226 a4a: b0ff sub sp, #508 ; 0x1fc | |
227 a4c: b0c8 sub sp, #288 ; 0x120 | |
228 a4e: 2000 mov r0, #0 | |
229 a50: 9000 str r0, [sp, #0] | |
230 a52: a846 add r0, sp, #280 ; 0x118 | |
231 a54: 2101 mov r1, #1 | |
232 a56: f000 ffc7 bl 0x19e8 | |
233 a5a: a9c6 add r1, sp, #792 ; 0x318 | |
234 a5c: 7008 strb r0, [r1, #0] | |
235 a5e: a8c6 add r0, sp, #792 ; 0x318 | |
236 a60: 7800 ldrb r0, [r0, #0] | |
237 a62: 28ff cmp r0, #255 ; 0xff | |
238 a64: d031 beq 0xaca | |
239 a66: a846 add r0, sp, #280 ; 0x118 | |
240 a68: a902 add r1, sp, #8 | |
241 a6a: f000 fa81 bl 0xf70 | |
242 a6e: 9001 str r0, [sp, #4] | |
243 a70: 9801 ldr r0, [sp, #4] | |
244 a72: 2800 cmp r0, #0 | |
245 a74: d014 beq 0xaa0 | |
246 a76: a924 add r1, sp, #144 ; 0x90 | |
247 a78: 4668 mov r0, sp | |
248 a7a: 7a00 ldrb r0, [r0, #8] | |
249 a7c: 7008 strb r0, [r1, #0] | |
250 a7e: 2291 mov r2, #145 ; 0x91 | |
251 a80: 4668 mov r0, sp | |
252 a82: 4669 mov r1, sp | |
253 a84: 7909 ldrb r1, [r1, #4] | |
254 a86: 5411 strb r1, [r2, r0] | |
255 a88: a824 add r0, sp, #144 ; 0x90 | |
256 a8a: a986 add r1, sp, #536 ; 0x218 | |
257 a8c: f000 fb53 bl 0x1136 | |
258 a90: 2800 cmp r0, #0 | |
259 a92: d11a bne 0xaca | |
260 a94: a886 add r0, sp, #536 ; 0x218 | |
261 a96: a9c6 add r1, sp, #792 ; 0x318 | |
262 a98: 7809 ldrb r1, [r1, #0] | |
263 a9a: f000 ff7a bl 0x1992 | |
264 a9e: e014 b 0xaca | |
265 aa0: 4668 mov r0, sp | |
266 aa2: 7a00 ldrb r0, [r0, #8] | |
267 aa4: 2800 cmp r0, #0 | |
268 aa6: d110 bne 0xaca | |
269 aa8: a802 add r0, sp, #8 | |
270 aaa: a924 add r1, sp, #144 ; 0x90 | |
271 aac: f000 fd4e bl 0x154c | |
272 ab0: a824 add r0, sp, #144 ; 0x90 | |
273 ab2: a986 add r1, sp, #536 ; 0x218 | |
274 ab4: f000 fb3f bl 0x1136 | |
275 ab8: 2800 cmp r0, #0 | |
276 aba: d104 bne 0xac6 | |
277 abc: a886 add r0, sp, #536 ; 0x218 | |
278 abe: a9c6 add r1, sp, #792 ; 0x318 | |
279 ac0: 7809 ldrb r1, [r1, #0] | |
280 ac2: f000 ff66 bl 0x1992 | |
281 ac6: 2001 mov r0, #1 | |
282 ac8: 9000 str r0, [sp, #0] | |
283 aca: 9800 ldr r0, [sp, #0] | |
284 acc: b07f add sp, #508 ; 0x1fc | |
285 ace: b048 add sp, #288 ; 0x120 | |
286 ad0: bd00 pop {pc} | |
287 | |
288 $sta_select_application: | |
289 ad2: b500 push {lr} | |
290 ad4: b082 sub sp, #8 | |
291 ad6: f7ff ff47 bl 0x968 | |
292 ada: f001 f85d bl 0x1b98 ; $ser_initialize_serial_link | |
293 ade: f000 fd23 bl 0x1528 ; $con_initialize_conversion | |
294 ae2: f000 f81f bl 0xb24 ; $fluid_bootloader | |
295 ae6: f000 f91a bl 0xd1e ; $FTM_Tool_check | |
296 aea: b002 add sp, #8 | |
297 aec: bd00 pop {pc} | |
298 aee: 46c0 nop (mov r8, r8) | |
299 | |
300 af0: fffffa08 | |
301 af4: 0000ffff | |
302 af8: fffffa0a | |
303 afc: fffff804 | |
304 b00: ffff9800 | |
305 b04: 00002002 | |
306 b08: fffffd00 | |
307 b0c: 00001001 | |
308 | |
309 ; boot.obj .text section | |
310 | |
311 b10: e3a0d502 mov sp, #8388608 ; 0x800000 | |
312 b14: e28dd802 add sp, sp, #131072 ; 0x20000 | |
313 b18: e28fe005 add lr, pc, #5 | |
314 b1c: e12fff1e bx lr | |
315 b20: e1a00000 mov r0, r0 | |
316 | |
317 ; The fluid_bootloader() function is fatally hobbled: it initializes the UART | |
318 ; at 115200 baud, but then does a delay and returns - NO call to SeekMsg()! | |
319 | |
320 $fluid_bootloader: | |
321 b24: b500 push {lr} | |
322 b26: b082 sub sp, #8 | |
323 b28: 49f0 ldr r1, =0x83ff00 ; via 0xeec | |
324 b2a: 48d5 ldr r0, =0xffff5800 ; via 0xe80 | |
325 b2c: 6008 str r0, [r1, #0] | |
326 b2e: 2000 mov r0, #0 | |
327 b30: 2107 mov r1, #7 | |
328 b32: f000 f9a7 bl 0xe84 ; $uart_init | |
329 b36: 2000 mov r0, #0 | |
330 b38: 9001 str r0, [sp, #4] | |
331 b3a: 9000 str r0, [sp, #0] | |
332 b3c: 9900 ldr r1, [sp, #0] | |
333 b3e: 2005 mov r0, #5 | |
334 b40: 0400 lsl r0, r0, #16 | |
335 b42: 4281 cmp r1, r0 | |
336 b44: d20a bcs 0xb5c | |
337 b46: 9801 ldr r0, [sp, #4] | |
338 b48: 3001 add r0, #1 | |
339 b4a: 9001 str r0, [sp, #4] | |
340 b4c: 9800 ldr r0, [sp, #0] | |
341 b4e: 3001 add r0, #1 | |
342 b50: 9000 str r0, [sp, #0] | |
343 b52: 9900 ldr r1, [sp, #0] | |
344 b54: 2005 mov r0, #5 | |
345 b56: 0400 lsl r0, r0, #16 | |
346 b58: 4281 cmp r1, r0 | |
347 b5a: d3f4 bcc 0xb46 | |
348 b5c: b002 add sp, #8 | |
349 b5e: bd00 pop {pc} | |
350 | |
351 $SeekMsg: | |
352 b60: b500 push {lr} | |
353 b62: b086 sub sp, #24 ; 0x18 | |
354 b64: 48f4 ldr r0, =0x800100 ; via 0xf38 | |
355 b66: 9005 str r0, [sp, #20] ; 0x14 | |
356 b68: 201b mov r0, #27 ; 0x1b | |
357 b6a: f000 f935 bl 0xdd8 | |
358 b6e: 20f6 mov r0, #246 ; 0xf6 | |
359 b70: f000 f932 bl 0xdd8 | |
360 b74: 2002 mov r0, #2 | |
361 b76: f000 f92f bl 0xdd8 | |
362 b7a: 2000 mov r0, #0 | |
363 b7c: f000 f92c bl 0xdd8 | |
364 b80: 2041 mov r0, #65 ; 0x41 | |
365 b82: f000 f929 bl 0xdd8 | |
366 b86: 2001 mov r0, #1 | |
367 b88: f000 f926 bl 0xdd8 | |
368 b8c: 2040 mov r0, #64 ; 0x40 | |
369 b8e: f000 f923 bl 0xdd8 | |
370 b92: 2001 mov r0, #1 | |
371 b94: 0300 lsl r0, r0, #12 | |
372 b96: f000 f937 bl 0xe08 | |
373 b9a: 281b cmp r0, #27 ; 0x1b | |
374 b9c: d000 beq 0xba0 | |
375 b9e: e0bc b 0xd1a | |
376 ba0: 2001 mov r0, #1 | |
377 ba2: 0300 lsl r0, r0, #12 | |
378 ba4: f000 f930 bl 0xe08 | |
379 ba8: 28f6 cmp r0, #246 ; 0xf6 | |
380 baa: d000 beq 0xbae | |
381 bac: e0b5 b 0xd1a | |
382 bae: 2001 mov r0, #1 | |
383 bb0: 0300 lsl r0, r0, #12 | |
384 bb2: f000 f929 bl 0xe08 | |
385 bb6: 2802 cmp r0, #2 | |
386 bb8: d000 beq 0xbbc | |
387 bba: e0ae b 0xd1a | |
388 bbc: 2001 mov r0, #1 | |
389 bbe: 0300 lsl r0, r0, #12 | |
390 bc0: f000 f922 bl 0xe08 | |
391 bc4: 2800 cmp r0, #0 | |
392 bc6: d000 beq 0xbca | |
393 bc8: e0a7 b 0xd1a | |
394 bca: 2001 mov r0, #1 | |
395 bcc: 0300 lsl r0, r0, #12 | |
396 bce: f000 f91b bl 0xe08 | |
397 bd2: 2852 cmp r0, #82 ; 0x52 | |
398 bd4: d000 beq 0xbd8 | |
399 bd6: e0a0 b 0xd1a | |
400 bd8: 2001 mov r0, #1 | |
401 bda: 0300 lsl r0, r0, #12 | |
402 bdc: f000 f914 bl 0xe08 | |
403 be0: 2801 cmp r0, #1 | |
404 be2: d000 beq 0xbe6 | |
405 be4: e099 b 0xd1a | |
406 be6: 2001 mov r0, #1 | |
407 be8: 0300 lsl r0, r0, #12 | |
408 bea: f000 f90d bl 0xe08 | |
409 bee: 2853 cmp r0, #83 ; 0x53 | |
410 bf0: d000 beq 0xbf4 | |
411 bf2: e092 b 0xd1a | |
412 bf4: 201b mov r0, #27 ; 0x1b | |
413 bf6: f000 f8ef bl 0xdd8 | |
414 bfa: 20f6 mov r0, #246 ; 0xf6 | |
415 bfc: f000 f8ec bl 0xdd8 | |
416 c00: 2002 mov r0, #2 | |
417 c02: f000 f8e9 bl 0xdd8 | |
418 c06: 2000 mov r0, #0 | |
419 c08: f000 f8e6 bl 0xdd8 | |
420 c0c: 2041 mov r0, #65 ; 0x41 | |
421 c0e: f000 f8e3 bl 0xdd8 | |
422 c12: 2002 mov r0, #2 | |
423 c14: f000 f8e0 bl 0xdd8 | |
424 c18: 2043 mov r0, #67 ; 0x43 | |
425 c1a: f000 f8dd bl 0xdd8 | |
426 c1e: 2001 mov r0, #1 | |
427 c20: 0300 lsl r0, r0, #12 | |
428 c22: f000 f8f1 bl 0xe08 | |
429 c26: 4669 mov r1, sp | |
430 c28: 7208 strb r0, [r1, #8] | |
431 c2a: 4668 mov r0, sp | |
432 c2c: 2102 mov r1, #2 | |
433 c2e: 7441 strb r1, [r0, #17] ; 0x11 | |
434 c30: 2000 mov r0, #0 | |
435 c32: 9000 str r0, [sp, #0] | |
436 c34: 9800 ldr r0, [sp, #0] | |
437 c36: 2802 cmp r0, #2 | |
438 c38: d216 bcs 0xc68 | |
439 c3a: 2001 mov r0, #1 | |
440 c3c: 0300 lsl r0, r0, #12 | |
441 c3e: f000 f8e3 bl 0xe08 | |
442 c42: 466a mov r2, sp | |
443 c44: 9900 ldr r1, [sp, #0] | |
444 c46: 1a51 sub r1, r2, r1 | |
445 c48: 7348 strb r0, [r1, #13] ; 0xd | |
446 c4a: 4668 mov r0, sp | |
447 c4c: 9900 ldr r1, [sp, #0] | |
448 c4e: 1a40 sub r0, r0, r1 | |
449 c50: 7b40 ldrb r0, [r0, #13] ; 0xd | |
450 c52: 4669 mov r1, sp | |
451 c54: 7c49 ldrb r1, [r1, #17] ; 0x11 | |
452 c56: 4048 eor r0, r1 | |
453 c58: 4669 mov r1, sp | |
454 c5a: 7448 strb r0, [r1, #17] ; 0x11 | |
455 c5c: 9800 ldr r0, [sp, #0] | |
456 c5e: 3001 add r0, #1 | |
457 c60: 9000 str r0, [sp, #0] | |
458 c62: 9800 ldr r0, [sp, #0] | |
459 c64: 2802 cmp r0, #2 | |
460 c66: d3e8 bcc 0xc3a | |
461 c68: 4668 mov r0, sp | |
462 c6a: 8980 ldrh r0, [r0, #12] ; 0xc | |
463 c6c: 466a mov r2, sp | |
464 c6e: 1e41 sub r1, r0, #1 | |
465 c70: 8191 strh r1, [r2, #12] ; 0xc | |
466 c72: 2800 cmp r0, #0 | |
467 c74: d016 beq 0xca4 | |
468 c76: 2001 mov r0, #1 | |
469 c78: 0300 lsl r0, r0, #12 | |
470 c7a: f000 f8c5 bl 0xe08 | |
471 c7e: 9905 ldr r1, [sp, #20] ; 0x14 | |
472 c80: 7008 strb r0, [r1, #0] | |
473 c82: 9805 ldr r0, [sp, #20] ; 0x14 | |
474 c84: 7801 ldrb r1, [r0, #0] | |
475 c86: 4668 mov r0, sp | |
476 c88: 7c40 ldrb r0, [r0, #17] ; 0x11 | |
477 c8a: 4041 eor r1, r0 | |
478 c8c: 4668 mov r0, sp | |
479 c8e: 7441 strb r1, [r0, #17] ; 0x11 | |
480 c90: 9805 ldr r0, [sp, #20] ; 0x14 | |
481 c92: 3001 add r0, #1 | |
482 c94: 9005 str r0, [sp, #20] ; 0x14 | |
483 c96: 4668 mov r0, sp | |
484 c98: 8982 ldrh r2, [r0, #12] ; 0xc | |
485 c9a: 4669 mov r1, sp | |
486 c9c: 1e50 sub r0, r2, #1 | |
487 c9e: 8188 strh r0, [r1, #12] ; 0xc | |
488 ca0: 2a00 cmp r2, #0 | |
489 ca2: d1e8 bne 0xc76 | |
490 ca4: 2001 mov r0, #1 | |
491 ca6: 0300 lsl r0, r0, #12 | |
492 ca8: f000 f8ae bl 0xe08 | |
493 cac: 4669 mov r1, sp | |
494 cae: 7408 strb r0, [r1, #16] ; 0x10 | |
495 cb0: 4668 mov r0, sp | |
496 cb2: 7c01 ldrb r1, [r0, #16] ; 0x10 | |
497 cb4: 7c40 ldrb r0, [r0, #17] ; 0x11 | |
498 cb6: 4281 cmp r1, r0 | |
499 cb8: d015 beq 0xce6 | |
500 cba: 201b mov r0, #27 ; 0x1b | |
501 cbc: f000 f88c bl 0xdd8 | |
502 cc0: 20f6 mov r0, #246 ; 0xf6 | |
503 cc2: f000 f889 bl 0xdd8 | |
504 cc6: 2002 mov r0, #2 | |
505 cc8: f000 f886 bl 0xdd8 | |
506 ccc: 2000 mov r0, #0 | |
507 cce: f000 f883 bl 0xdd8 | |
508 cd2: 2045 mov r0, #69 ; 0x45 | |
509 cd4: f000 f880 bl 0xdd8 | |
510 cd8: 2053 mov r0, #83 ; 0x53 | |
511 cda: f000 f87d bl 0xdd8 | |
512 cde: 2016 mov r0, #22 ; 0x16 | |
513 ce0: f000 f87a bl 0xdd8 | |
514 ce4: e019 b 0xd1a | |
515 ce6: 201b mov r0, #27 ; 0x1b | |
516 ce8: f000 f876 bl 0xdd8 | |
517 cec: 20f6 mov r0, #246 ; 0xf6 | |
518 cee: f000 f873 bl 0xdd8 | |
519 cf2: 2002 mov r0, #2 | |
520 cf4: f000 f870 bl 0xdd8 | |
521 cf8: 2000 mov r0, #0 | |
522 cfa: f000 f86d bl 0xdd8 | |
523 cfe: 2041 mov r0, #65 ; 0x41 | |
524 d00: f000 f86a bl 0xdd8 | |
525 d04: 2003 mov r0, #3 | |
526 d06: f000 f867 bl 0xdd8 | |
527 d0a: 2042 mov r0, #66 ; 0x42 | |
528 d0c: f000 f864 bl 0xdd8 | |
529 d10: 4876 ldr r0, =0x83ff00 ; via 0xeec | |
530 d12: 6800 ldr r0, [r0, #0] | |
531 d14: 4990 ldr r1, =0x800100 ; via 0xf58 | |
532 d16: f000 f85e bl 0xdd6 | |
533 d1a: b006 add sp, #24 ; 0x18 | |
534 d1c: bd00 pop {pc} | |
535 | |
536 $FTM_Tool_check: | |
537 d1e: b500 push {lr} | |
538 d20: b081 sub sp, #4 | |
539 d22: 2066 mov r0, #102 ; 0x66 | |
540 d24: f000 f858 bl 0xdd8 | |
541 d28: 2074 mov r0, #116 ; 0x74 | |
542 d2a: f000 f855 bl 0xdd8 | |
543 d2e: 206d mov r0, #109 ; 0x6d | |
544 d30: f000 f852 bl 0xdd8 | |
545 d34: 2074 mov r0, #116 ; 0x74 | |
546 d36: f000 f84f bl 0xdd8 | |
547 d3a: 206f mov r0, #111 ; 0x6f | |
548 d3c: f000 f84c bl 0xdd8 | |
549 d40: 206f mov r0, #111 ; 0x6f | |
550 d42: f000 f849 bl 0xdd8 | |
551 d46: 206c mov r0, #108 ; 0x6c | |
552 d48: f000 f846 bl 0xdd8 | |
553 d4c: 4983 ldr r1, =0x83ff80 ; via 0xf5c | |
554 d4e: 2000 mov r0, #0 | |
555 d50: 7008 strb r0, [r1, #0] | |
556 d52: 9000 str r0, [sp, #0] | |
557 d54: 9800 ldr r0, [sp, #0] | |
558 d56: 0c00 lsr r0, r0, #16 | |
559 d58: d105 bne 0xd66 | |
560 d5a: 9800 ldr r0, [sp, #0] | |
561 d5c: 3001 add r0, #1 | |
562 d5e: 9000 str r0, [sp, #0] | |
563 d60: 9800 ldr r0, [sp, #0] | |
564 d62: 0c00 lsr r0, r0, #16 | |
565 d64: d0f9 beq 0xd5a | |
566 d66: 2007 mov r0, #7 | |
567 d68: 0400 lsl r0, r0, #16 | |
568 d6a: f000 f84d bl 0xe08 | |
569 d6e: 2879 cmp r0, #121 ; 0x79 | |
570 d70: d10e bne 0xd90 | |
571 d72: 2001 mov r0, #1 | |
572 d74: 0300 lsl r0, r0, #12 | |
573 d76: f000 f847 bl 0xe08 | |
574 d7a: 2865 cmp r0, #101 ; 0x65 | |
575 d7c: d108 bne 0xd90 | |
576 d7e: 2001 mov r0, #1 | |
577 d80: 0300 lsl r0, r0, #12 | |
578 d82: f000 f841 bl 0xe08 | |
579 d86: 2873 cmp r0, #115 ; 0x73 | |
580 d88: d102 bne 0xd90 | |
581 d8a: 4874 ldr r0, =0x83ff80 ; via 0xf5c | |
582 d8c: 2101 mov r1, #1 | |
583 d8e: 7001 strb r1, [r0, #0] | |
584 d90: f000 f8ce bl 0xf30 | |
585 d94: 2800 cmp r0, #0 | |
586 d96: d00d beq 0xdb4 | |
587 d98: 206d mov r0, #109 ; 0x6d | |
588 d9a: f000 f81d bl 0xdd8 | |
589 d9e: 206f mov r0, #111 ; 0x6f | |
590 da0: f000 f81a bl 0xdd8 | |
591 da4: 2064 mov r0, #100 ; 0x64 | |
592 da6: f000 f817 bl 0xdd8 | |
593 daa: 2065 mov r0, #101 ; 0x65 | |
594 dac: f000 f814 bl 0xdd8 | |
595 db0: 206d mov r0, #109 ; 0x6d | |
596 db2: e00c b 0xdce | |
597 db4: 2065 mov r0, #101 ; 0x65 | |
598 db6: f000 f80f bl 0xdd8 | |
599 dba: 2072 mov r0, #114 ; 0x72 | |
600 dbc: f000 f80c bl 0xdd8 | |
601 dc0: 2072 mov r0, #114 ; 0x72 | |
602 dc2: f000 f809 bl 0xdd8 | |
603 dc6: 206f mov r0, #111 ; 0x6f | |
604 dc8: f000 f806 bl 0xdd8 | |
605 dcc: 2072 mov r0, #114 ; 0x72 | |
606 dce: f000 f803 bl 0xdd8 | |
607 dd2: b001 add sp, #4 | |
608 dd4: bd00 pop {pc} | |
609 | |
610 $jump: | |
611 dd6: 4708 bx r1 | |
612 | |
613 $putchar: ; static | |
614 dd8: b081 sub sp, #4 | |
615 dda: 4669 mov r1, sp | |
616 ddc: 7008 strb r0, [r1, #0] | |
617 dde: 4843 ldr r0, =0x83ff00 ; via 0xeec | |
618 de0: 6800 ldr r0, [r0, #0] | |
619 de2: 7940 ldrb r0, [r0, #5] | |
620 de4: 0980 lsr r0, r0, #6 | |
621 de6: d3fa bcc 0xdde | |
622 de8: 4840 ldr r0, =0x83ff00 ; via 0xeec | |
623 dea: 6800 ldr r0, [r0, #0] | |
624 dec: 4669 mov r1, sp | |
625 dee: 7809 ldrb r1, [r1, #0] | |
626 df0: 7001 strb r1, [r0, #0] | |
627 df2: b001 add sp, #4 | |
628 df4: 46f7 mov pc, lr | |
629 | |
630 $getchar: | |
631 df6: 483d ldr r0, =0x83ff00 ; via 0xeec | |
632 df8: 6800 ldr r0, [r0, #0] | |
633 dfa: 7940 ldrb r0, [r0, #5] | |
634 dfc: 0840 lsr r0, r0, #1 | |
635 dfe: d3fa bcc 0xdf6 | |
636 e00: 483a ldr r0, =0x83ff00 ; via 0xeec | |
637 e02: 6800 ldr r0, [r0, #0] | |
638 e04: 7800 ldrb r0, [r0, #0] | |
639 e06: 4770 bx lr | |
640 | |
641 $getchar_timeout: | |
642 e08: b083 sub sp, #12 ; 0xc | |
643 e0a: 9000 str r0, [sp, #0] | |
644 e0c: 9800 ldr r0, [sp, #0] | |
645 e0e: 9002 str r0, [sp, #8] | |
646 e10: 4836 ldr r0, =0x83ff00 ; via 0xeec | |
647 e12: 6800 ldr r0, [r0, #0] | |
648 e14: 7940 ldrb r0, [r0, #5] | |
649 e16: 0840 lsr r0, r0, #1 | |
650 e18: d20c bcs 0xe34 | |
651 e1a: 9802 ldr r0, [sp, #8] | |
652 e1c: 3801 sub r0, #1 | |
653 e1e: 9002 str r0, [sp, #8] | |
654 e20: 9802 ldr r0, [sp, #8] | |
655 e22: 2800 cmp r0, #0 | |
656 e24: d101 bne 0xe2a | |
657 e26: 20ff mov r0, #255 ; 0xff | |
658 e28: e007 b 0xe3a | |
659 e2a: 4830 ldr r0, =0x83ff00 ; via 0xeec | |
660 e2c: 6800 ldr r0, [r0, #0] | |
661 e2e: 7940 ldrb r0, [r0, #5] | |
662 e30: 0840 lsr r0, r0, #1 | |
663 e32: d3f2 bcc 0xe1a | |
664 e34: 482d ldr r0, =0x83ff00 ; via 0xeec | |
665 e36: 6800 ldr r0, [r0, #0] | |
666 e38: 7800 ldrb r0, [r0, #0] | |
667 e3a: b003 add sp, #12 ; 0xc | |
668 e3c: 4770 bx lr | |
669 | |
670 $UartTimeout: | |
671 e3e: b081 sub sp, #4 | |
672 e40: e001 b 0xe46 | |
673 e42: 9800 ldr r0, [sp, #0] | |
674 e44: 3801 sub r0, #1 | |
675 e46: 9000 str r0, [sp, #0] | |
676 e48: 4828 ldr r0, =0x83ff00 ; via 0xeec | |
677 e4a: 6800 ldr r0, [r0, #0] | |
678 e4c: 7940 ldrb r0, [r0, #5] | |
679 e4e: 0840 lsr r0, r0, #1 | |
680 e50: d202 bcs 0xe58 | |
681 e52: 9800 ldr r0, [sp, #0] | |
682 e54: 2800 cmp r0, #0 | |
683 e56: dcf4 bgt 0xe42 | |
684 e58: 9800 ldr r0, [sp, #0] | |
685 e5a: 2800 cmp r0, #0 | |
686 e5c: dd01 ble 0xe62 | |
687 e5e: 2000 mov r0, #0 | |
688 e60: e000 b 0xe64 | |
689 e62: 2001 mov r0, #1 | |
690 e64: b001 add sp, #4 | |
691 e66: 4770 bx lr | |
692 | |
693 $hardware_init: | |
694 e68: b082 sub sp, #8 | |
695 e6a: 9000 str r0, [sp, #0] | |
696 e6c: 4669 mov r1, sp | |
697 e6e: 2000 mov r0, #0 | |
698 e70: 7188 strb r0, [r1, #6] | |
699 e72: 9900 ldr r1, [sp, #0] | |
700 e74: 483a ldr r0, =0xfffef000 ; via 0xf60 | |
701 e76: 8800 ldrh r0, [r0, #0] | |
702 e78: 8008 strh r0, [r1, #0] | |
703 e7a: b002 add sp, #8 | |
704 e7c: 4770 bx lr | |
705 e7e: 46c0 nop (mov r8, r8) | |
706 | |
707 <portion not analyzed yet> | |
708 | |
709 ; start.obj .text:v$3 section, matches familiar versions | |
710 | |
711 _sta_select_application: | |
712 1d90: e92d4000 stmdb sp!, {lr} | |
713 1d94: e28fe001 add lr, pc, #1 | |
714 1d98: e12fff1e bx lr | |
715 1d9c: f7fe fe99 bl 0xad2 ; $sta_select_application | |
716 1da0: 4778 bx pc | |
717 1da2: 46c0 nop (mov r8, r8) | |
718 1da4: e8bd8000 ldmia sp!, {pc} | |
719 | |
720 <1DA8-1EFF: all FFs> | |
721 | |
722 1f00: 00000001 | |
723 | |
724 <1F04-end: all FFs> |