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

📄 gui__memset.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\gui__memset.o --depend=.\Obj\gui__memset.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\Core\GUI__memset.c]
                          THUMB

                          AREA ||i.GUI__memset||, CODE, READONLY, ALIGN=1

                  GUI__memset PROC
;;;39     */
;;;40     void GUI__memset(U8* p, U8 Fill, int NumBytes) {
000000  b510              PUSH     {r4,lr}
;;;41       int NumInts;
;;;42       /* Write bytes until we are done or have reached an int boundary */
;;;43       while (NumBytes && ((sizeof(int) - 1) & (U32)p)) {
;;;44         *p++ = Fill;
;;;45         NumBytes--;
000002  e002              B        |L1.10|
                  |L1.4|
000004  f8001b01          STRB     r1,[r0],#1            ;44
000008  1e52              SUBS     r2,r2,#1
                  |L1.10|
00000a  b10a              CBZ      r2,|L1.16|
00000c  0783              LSLS     r3,r0,#30             ;43
00000e  d1f9              BNE      |L1.4|
                  |L1.16|
;;;46       }
;;;47       /* Write Ints */
;;;48       NumInts = (unsigned)NumBytes / sizeof(int);
000010  0893              LSRS     r3,r2,#2
;;;49       if (NumInts) {
000012  d018              BEQ      |L1.70|
;;;50         int FillInt;
;;;51         int *pInt;
;;;52         NumBytes &= (sizeof(int) - 1);
;;;53         if (sizeof(int) == 2) {        /* May some compilers generate a warning at this line: Condition is alwaws true/false */
;;;54           FillInt = Fill * 0x101;      /* May some compilers generate a warning at this line: Unreachable code */
;;;55         } else if (sizeof(int) == 4) { /* May some compilers generate a warning at this line: Condition is alwaws true/false */
;;;56           FillInt = Fill * 0x1010101;  /* May some compilers generate a warning at this line: Unreachable code */
000014  eb014401          ADD      r4,r1,r1,LSL #16
000018  f0020203          AND      r2,r2,#3              ;52
00001c  eb042404          ADD      r4,r4,r4,LSL #8
;;;57         }
;;;58         pInt = (int*)p;
;;;59         /* Fill large amount of data at a time */
;;;60         while (NumInts >= 4) { 
000020  e006              B        |L1.48|
                  |L1.34|
;;;61           *pInt++ = FillInt;
;;;62           *pInt++ = FillInt;
000022  6004              STR      r4,[r0,#0]
;;;63           *pInt++ = FillInt;
000024  6044              STR      r4,[r0,#4]
;;;64           *pInt++ = FillInt;
000026  6084              STR      r4,[r0,#8]
000028  f8404f0c          STR      r4,[r0,#0xc]!
00002c  1d00              ADDS     r0,r0,#4
;;;65           NumInts -= 4;
00002e  1f1b              SUBS     r3,r3,#4
                  |L1.48|
000030  2b04              CMP      r3,#4                 ;60
000032  daf6              BGE      |L1.34|
000034  e001              B        |L1.58|
                  |L1.54|
;;;66         }
;;;67         /* Fill one int at a time */
;;;68         while (NumInts) {
;;;69           *pInt++ = FillInt;
000036  c010              STM      r0!,{r4}
;;;70           NumInts--;
000038  1e5b              SUBS     r3,r3,#1
                  |L1.58|
00003a  2b00              CMP      r3,#0                 ;68
00003c  d1fb              BNE      |L1.54|
00003e  e002              B        |L1.70|
                  |L1.64|
;;;71         }
;;;72         p = (U8*)pInt;
;;;73       }
;;;74       /* Fill the remainder byte wise */
;;;75       while (NumBytes) {
;;;76         *p++ = Fill;
000040  f8001b01          STRB     r1,[r0],#1
;;;77         NumBytes--;
000044  1e52              SUBS     r2,r2,#1
                  |L1.70|
000046  2a00              CMP      r2,#0                 ;75
000048  d1fa              BNE      |L1.64|
;;;78       }
;;;79     }
00004a  bd10              POP      {r4,pc}
;;;80     
                          ENDP

⌨️ 快捷键说明

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