📄 lib_str.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 919] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\output\lib_str.o --depend=.\output\lib_str.d --device=DARMSTM --apcs=interwork -O1 -I. -I..\BSP -I..\..\..\..\..\uCOS-II\Ports\arm-cortex-m3\Generic\RealView -I..\..\..\..\..\uCOS-II\Source -I..\..\..\..\..\CPU\ST\STM32\inc -I..\..\..\..\..\uC-CPU -I..\..\..\..\..\uC-CPU\Arm-Cortex-M3\RealView -I..\..\..\..\..\uC-LIB -IC:\Keil\ARM\INC\ST\STM32F10x --omf_browse=.\output\lib_str.crf ..\..\..\..\..\uC-LIB\lib_str.c]
THUMB
AREA ||.text||, CODE, READONLY, ALIGN=1
Str_Len PROC
;;;144
;;;145 len = 0;
000000 2100 MOVS r1,#0
;;;146 while (( pstr != (CPU_CHAR *)0) && /* Calc str len until NULL ptr (see Note #2a) ... */
000002 e001 B |L1.8|
|L1.4|
;;;147 (*pstr != (CPU_CHAR )0)) { /* ... or NULL char found (see Note #2b). */
;;;148 len++;
000004 1c49 ADDS r1,r1,#1
;;;149 pstr++;
000006 1c40 ADDS r0,r0,#1
|L1.8|
000008 b110 CBZ r0,|L1.16|
00000a 7802 LDRB r2,[r0,#0] ;147
00000c 2a00 CMP r2,#0 ;147
00000e d1f9 BNE |L1.4|
|L1.16|
;;;150 }
;;;151
;;;152 return (len);
000010 4608 MOV r0,r1
;;;153 }
000012 4770 BX lr
;;;154
ENDP
Str_Copy PROC
;;;195 CPU_CHAR *psrc)
;;;196 {
000014 b510 PUSH {r4,lr}
;;;197 CPU_CHAR *pstr;
;;;198 CPU_CHAR *pstr_next;
;;;199
;;;200 /* Rtn NULL if str ptr(s) NULL (see Note #2a). */
;;;201 if (pdest == (CPU_CHAR *)0) {
000016 b908 CBNZ r0,|L1.28|
;;;202 return ((CPU_CHAR *)0);
000018 2000 MOVS r0,#0
;;;203 }
;;;204 if (psrc == (CPU_CHAR *)0) {
;;;205 return ((CPU_CHAR *)0);
;;;206 }
;;;207
;;;208
;;;209 pstr = pdest;
;;;210 pstr_next = pstr;
;;;211 pstr_next++;
;;;212 while (( pstr_next != (CPU_CHAR *)0) && /* Copy str until NULL ptr(s) (see Note #2b) ... */
;;;213 ( psrc != (CPU_CHAR *)0) &&
;;;214 (*psrc != (CPU_CHAR )0)) { /* ... or NULL char found (see Note #2c). */
;;;215 *pstr = *psrc;
;;;216 pstr++;
;;;217 pstr_next++;
;;;218 psrc++;
;;;219 }
;;;220
;;;221 *pstr = (CPU_CHAR)0; /* Append NULL char (see Note #2b2). */
;;;222
;;;223
;;;224 return (pdest);
;;;225 }
00001a bd10 POP {r4,pc}
|L1.28|
00001c b909 CBNZ r1,|L1.34|
00001e 2000 MOVS r0,#0 ;205
000020 bd10 POP {r4,pc}
|L1.34|
000022 4602 MOV r2,r0 ;209
000024 4610 MOV r0,r2 ;210
000026 1c43 ADDS r3,r0,#1 ;211
000028 e003 B |L1.50|
|L1.42|
00002a 7014 STRB r4,[r2,#0] ;215
00002c 1c52 ADDS r2,r2,#1 ;216
00002e 1c5b ADDS r3,r3,#1 ;217
000030 1c49 ADDS r1,r1,#1 ;218
|L1.50|
000032 b11b CBZ r3,|L1.60|
000034 b111 CBZ r1,|L1.60|
000036 780c LDRB r4,[r1,#0] ;214
000038 2c00 CMP r4,#0 ;214
00003a d1f6 BNE |L1.42|
|L1.60|
00003c 2100 MOVS r1,#0 ;221
00003e 7011 STRB r1,[r2,#0] ;221
000040 bd10 POP {r4,pc}
;;;226
ENDP
Str_Copy_N PROC
;;;275 CPU_SIZE_T len_max)
;;;276 {
000042 b570 PUSH {r4-r6,lr}
;;;277 CPU_CHAR *pstr;
;;;278 CPU_CHAR *pstr_next;
;;;279 CPU_SIZE_T len_copy;
;;;280
;;;281 /* Rtn NULL if str ptr(s) NULL (see Note #2a). */
;;;282 if (pdest == (CPU_CHAR *)0) {
000044 b908 CBNZ r0,|L1.74|
;;;283 return ((CPU_CHAR *)0);
000046 2000 MOVS r0,#0
;;;284 }
;;;285 if (psrc == (CPU_CHAR *)0) {
;;;286 return ((CPU_CHAR *)0);
;;;287 }
;;;288
;;;289 if (len_max == (CPU_SIZE_T)0) { /* Rtn NULL if copy len equals zero (see Note #2d). */
;;;290 return ((CPU_CHAR *)0);
;;;291 }
;;;292
;;;293
;;;294 pstr = pdest;
;;;295 pstr_next = pstr;
;;;296 pstr_next++;
;;;297 len_copy = 0;
;;;298
;;;299 while (( pstr_next != (CPU_CHAR *)0) && /* Copy str until NULL ptr(s) (see Note #2b) ... */
;;;300 ( psrc != (CPU_CHAR *)0) &&
;;;301 (*psrc != (CPU_CHAR )0) && /* ... or NULL char found (see Note #2c); ... */
;;;302 ( len_copy < (CPU_SIZE_T)len_max)) { /* ... or max nbr chars copied (see Note #2d). */
;;;303 *pstr = *psrc;
;;;304 pstr++;
;;;305 pstr_next++;
;;;306 psrc++;
;;;307 len_copy++;
;;;308 }
;;;309
;;;310 *pstr = (CPU_CHAR)0; /* Append NULL char (see Note #2b2). */
;;;311
;;;312
;;;313 return (pdest);
;;;314 }
000048 bd70 POP {r4-r6,pc}
|L1.74|
00004a b909 CBNZ r1,|L1.80|
00004c 2000 MOVS r0,#0 ;286
00004e bd70 POP {r4-r6,pc}
|L1.80|
000050 b90a CBNZ r2,|L1.86|
000052 2000 MOVS r0,#0 ;290
000054 bd70 POP {r4-r6,pc}
|L1.86|
000056 4603 MOV r3,r0 ;294
000058 4618 MOV r0,r3 ;295
00005a 1c45 ADDS r5,r0,#1 ;296
00005c 2400 MOVS r4,#0 ;297
00005e e004 B |L1.106|
|L1.96|
000060 701e STRB r6,[r3,#0] ;303
000062 1c5b ADDS r3,r3,#1 ;304
000064 1c6d ADDS r5,r5,#1 ;305
000066 1c49 ADDS r1,r1,#1 ;306
000068 1c64 ADDS r4,r4,#1 ;307
|L1.106|
00006a b125 CBZ r5,|L1.118|
00006c b119 CBZ r1,|L1.118|
00006e 780e LDRB r6,[r1,#0] ;301
000070 b10e CBZ r6,|L1.118|
000072 4294 CMP r4,r2 ;302
000074 d3f4 BCC |L1.96|
|L1.118|
000076 2100 MOVS r1,#0 ;310
000078 7019 STRB r1,[r3,#0] ;310
00007a bd70 POP {r4-r6,pc}
;;;315
ENDP
Str_Cat PROC
;;;359 CPU_CHAR *pstr_cat)
;;;360 {
00007c b510 PUSH {r4,lr}
;;;361 CPU_CHAR *pstr;
;;;362 CPU_CHAR *pstr_next;
;;;363
;;;364 /* Rtn NULL if str ptr(s) NULL (see Note #2a). */
;;;365 if (pdest == (CPU_CHAR *)0) {
00007e b908 CBNZ r0,|L1.132|
;;;366 return ((CPU_CHAR *)0);
000080 2000 MOVS r0,#0
;;;367 }
;;;368 if (pstr_cat == (CPU_CHAR *)0) {
;;;369 return ((CPU_CHAR *)0);
;;;370 }
;;;371
;;;372
;;;373 pstr = pdest;
;;;374 while (( pstr != (CPU_CHAR *)0) && /* Adv to end of cur dest str until NULL ptr ... */
;;;375 (*pstr != (CPU_CHAR )0)) { /* ... or NULL char found.. */
;;;376 pstr++;
;;;377 }
;;;378 if (pstr == (CPU_CHAR *)0) { /* If NULL str overrun, rtn NULL (see Note #2b). */
;;;379 return ((CPU_CHAR *)0);
;;;380 }
;;;381
;;;382 pstr_next = pstr;
;;;383 pstr_next++;
;;;384 while (( pstr_next != (CPU_CHAR *)0) && /* Cat str until NULL ptr(s) (see Note #2c) ... */
;;;385 ( pstr_cat != (CPU_CHAR *)0) &&
;;;386 (*pstr_cat != (CPU_CHAR )0)) { /* ... or NULL char found (see Note #2d). */
;;;387 *pstr = *pstr_cat;
;;;388 pstr++;
;;;389 pstr_next++;
;;;390 pstr_cat++;
;;;391 }
;;;392
;;;393 *pstr = (CPU_CHAR)0; /* Append NULL char (see Note #2c2). */
;;;394
;;;395
;;;396 return (pdest);
;;;397 }
000082 bd10 POP {r4,pc}
|L1.132|
000084 b909 CBNZ r1,|L1.138|
000086 2000 MOVS r0,#0 ;369
000088 bd10 POP {r4,pc}
|L1.138|
00008a 4602 MOV r2,r0 ;373
00008c e000 B |L1.144|
|L1.142|
00008e 1c52 ADDS r2,r2,#1 ;376
|L1.144|
000090 b112 CBZ r2,|L1.152|
000092 7813 LDRB r3,[r2,#0] ;375
000094 2b00 CMP r3,#0 ;375
000096 d1fa BNE |L1.142|
|L1.152|
000098 b90a CBNZ r2,|L1.158|
00009a 2000 MOVS r0,#0 ;379
00009c bd10 POP {r4,pc}
|L1.158|
00009e 1c53 ADDS r3,r2,#1 ;383
0000a0 e003 B |L1.170|
|L1.162|
0000a2 7014 STRB r4,[r2,#0] ;387
0000a4 1c52 ADDS r2,r2,#1 ;388
0000a6 1c5b ADDS r3,r3,#1 ;389
0000a8 1c49 ADDS r1,r1,#1 ;390
|L1.170|
0000aa b11b CBZ r3,|L1.180|
0000ac b111 CBZ r1,|L1.180|
0000ae 780c LDRB r4,[r1,#0] ;386
0000b0 2c00 CMP r4,#0 ;386
0000b2 d1f6 BNE |L1.162|
|L1.180|
0000b4 2100 MOVS r1,#0 ;393
0000b6 7011 STRB r1,[r2,#0] ;393
0000b8 bd10 POP {r4,pc}
;;;398
ENDP
Str_Cat_N PROC
;;;450 CPU_SIZE_T len_max)
;;;451 {
0000ba b570 PUSH {r4-r6,lr}
;;;452 CPU_CHAR *pstr;
;;;453 CPU_CHAR *pstr_next;
;;;454 CPU_SIZE_T len_cat;
;;;455
;;;456 /* Rtn NULL if str ptr(s) NULL (see Note #2a). */
;;;457 if (pdest == (CPU_CHAR *)0) {
0000bc b908 CBNZ r0,|L1.194|
;;;458 return ((CPU_CHAR *)0);
0000be 2000 MOVS r0,#0
;;;459 }
;;;460 if (pstr_cat == (CPU_CHAR *)0) {
;;;461 return ((CPU_CHAR *)0);
;;;462 }
;;;463
;;;464 if (len_max == (CPU_SIZE_T)0) { /* Rtn NULL if cat len equals zero (see Note #2e). */
;;;465 return ((CPU_CHAR *)0);
;;;466 }
;;;467
;;;468
;;;469 pstr = pdest;
;;;470 while (( pstr != (CPU_CHAR *)0) && /* Adv to end of cur dest str until NULL ptr ... */
;;;471 (*pstr != (CPU_CHAR )0)) { /* ... or NULL char found.. */
;;;472 pstr++;
;;;473 }
;;;474 if (pstr == (CPU_CHAR *)0) { /* If NULL str overrun, rtn NULL (see Note #2b). */
;;;475 return ((CPU_CHAR *)0);
;;;476 }
;;;477
;;;478 pstr_next = pstr;
;;;479 pstr_next++;
;;;480 len_cat = 0;
;;;481
;;;482 while (( pstr_next != (CPU_CHAR *)0) && /* Cat str until NULL ptr(s) (see Note #2c) ... */
;;;483 ( pstr_cat != (CPU_CHAR *)0) &&
;;;484 (*pstr_cat != (CPU_CHAR )0) && /* ... or NULL char found (see Note #2d); ... */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -