⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lib_str.txt

📁 ucos2.86版本结合STM板极支持包
💻 TXT
📖 第 1 页 / 共 3 页
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 914] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\rvmdk\lib_str.o --depend=.\rvmdk\lib_str.d --device=DARMSTM -O1 -Otime -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 -I..\..\..\..\..\uC-Probe\Target\Plugins\uCOS-II -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\Source -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Ports\ST\STM32 -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Source -ID:\Keil\ARM\INC\ST\STM32F10x ..\..\..\..\..\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]
00000c  2a00              CMP      r2,#0
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
;;;200                                                                    /* Rtn NULL if str ptr(s) NULL (see Note #2a).          */
;;;201        if (pdest == (CPU_CHAR *)0) {
000014  b908              CBNZ     r0,|L1.26|
;;;202            return  ((CPU_CHAR *)0);
000016  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    }
000018  4770              BX       lr
                  |L1.26|
00001a  b909              CBNZ     r1,|L1.32|
00001c  2000              MOVS     r0,#0
00001e  4770              BX       lr
                  |L1.32|
000020  4602              MOV      r2,r0
000022  4610              MOV      r0,r2
000024  1c43              ADDS     r3,r0,#1
000026  e004              B        |L1.50|
                  |L1.40|
000028  f882f882          STRB     r12,[r2,#0]
00002c  1c52              ADDS     r2,r2,#1
00002e  1c5b              ADDS     r3,r3,#1
000030  1c49              ADDS     r1,r1,#1
                  |L1.50|
000032  b12b              CBZ      r3,|L1.64|
000034  b121              CBZ      r1,|L1.64|
000036  f891f891          LDRB     r12,[r1,#0]
00003a  f1bcf1bc          CMP      r12,#0
00003e  d1f3              BNE      |L1.40|
                  |L1.64|
000040  2100              MOVS     r1,#0
000042  7011              STRB     r1,[r2,#0]
000044  4770              BX       lr
;;;226    
                          ENDP

                  Str_Copy_N PROC
;;;275                           CPU_SIZE_T   len_max)
;;;276    {
000046  b430              PUSH     {r4,r5}
;;;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) {
000048  b910              CBNZ     r0,|L1.80|
;;;283            return  ((CPU_CHAR *)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    }
00004a  bc30              POP      {r4,r5}
00004c  2000              MOVS     r0,#0
00004e  4770              BX       lr
                  |L1.80|
000050  b911              CBNZ     r1,|L1.88|
000052  bc30              POP      {r4,r5}
000054  2000              MOVS     r0,#0
000056  4770              BX       lr
                  |L1.88|
000058  b912              CBNZ     r2,|L1.96|
00005a  bc30              POP      {r4,r5}
00005c  2000              MOVS     r0,#0
00005e  4770              BX       lr
                  |L1.96|
000060  4603              MOV      r3,r0
000062  4618              MOV      r0,r3
000064  1c44              ADDS     r4,r0,#1
000066  f04ff04f          MOV      r12,#0
00006a  e005              B        |L1.120|
                  |L1.108|
00006c  701d              STRB     r5,[r3,#0]
00006e  1c5b              ADDS     r3,r3,#1
000070  1c64              ADDS     r4,r4,#1
000072  1c49              ADDS     r1,r1,#1
000074  f10cf10c          ADD      r12,r12,#1
                  |L1.120|
000078  b124              CBZ      r4,|L1.132|
00007a  b119              CBZ      r1,|L1.132|
00007c  780d              LDRB     r5,[r1,#0]
00007e  b10d              CBZ      r5,|L1.132|
000080  4594              CMP      r12,r2
000082  d3f3              BCC      |L1.108|
                  |L1.132|
000084  2100              MOVS     r1,#0
000086  7019              STRB     r1,[r3,#0]
000088  bc30              POP      {r4,r5}
00008a  4770              BX       lr
;;;315    
                          ENDP

                  Str_Cat PROC
;;;364                                                                    /* Rtn NULL if str ptr(s) NULL (see Note #2a).          */
;;;365        if (pdest == (CPU_CHAR *)0) {
00008c  b908              CBNZ     r0,|L1.146|
;;;366            return  ((CPU_CHAR *)0);
00008e  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    }
000090  4770              BX       lr
                  |L1.146|
000092  b909              CBNZ     r1,|L1.152|
000094  2000              MOVS     r0,#0
000096  4770              BX       lr
                  |L1.152|
000098  4602              MOV      r2,r0
00009a  e000              B        |L1.158|
                  |L1.156|
00009c  1c52              ADDS     r2,r2,#1
                  |L1.158|
00009e  b112              CBZ      r2,|L1.166|
0000a0  7813              LDRB     r3,[r2,#0]
0000a2  2b00              CMP      r3,#0
0000a4  d1fa              BNE      |L1.156|
                  |L1.166|
0000a6  b90a              CBNZ     r2,|L1.172|
0000a8  2000              MOVS     r0,#0
0000aa  4770              BX       lr
                  |L1.172|
0000ac  1c53              ADDS     r3,r2,#1
0000ae  e004              B        |L1.186|
                  |L1.176|
0000b0  f882f882          STRB     r12,[r2,#0]
0000b4  1c52              ADDS     r2,r2,#1
0000b6  1c5b              ADDS     r3,r3,#1
0000b8  1c49              ADDS     r1,r1,#1
                  |L1.186|
0000ba  b12b              CBZ      r3,|L1.200|
0000bc  b121              CBZ      r1,|L1.200|
0000be  f891f891          LDRB     r12,[r1,#0]
0000c2  f1bcf1bc          CMP      r12,#0
0000c6  d1f3              BNE      |L1.176|
                  |L1.200|
0000c8  2100              MOVS     r1,#0
0000ca  7011              STRB     r1,[r2,#0]
0000cc  4770              BX       lr
;;;398    
                          ENDP

                  Str_Cat_N PROC
;;;450                          CPU_SIZE_T   len_max)
;;;451    {
0000ce  b430              PUSH     {r4,r5}
;;;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) {
0000d0  b910              CBNZ     r0,|L1.216|
;;;458            return  ((CPU_CHAR *)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); ...       */
;;;485               ( len_cat   <  (CPU_SIZE_T)len_max)) {               /* ... or max nbr chars cat'd (see Note #2d).           */
;;;486           *pstr = *pstr_cat;
;;;487            pstr++;
;;;488            pstr_next++;
;;;489            pstr_cat++;
;;;490            len_cat++;
;;;491        }
;;;492    
;;;493       *pstr = (CPU_CHAR)0;                                         /* Append NULL char (see Note #2c2).                    */
;;;494    
;;;495    
;;;496        return (pdest);
;;;497    }
0000d2  bc30              POP      {r4,r5}
0000d4  2000              MOVS     r0,#0
0000d6  4770              BX       lr

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -