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

📄 guiaachar4.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\guiaachar4.o --depend=.\Obj\guiaachar4.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\AntiAlias\GUIAAChar4.c]
                          THUMB

                          AREA ||i.Draw||, CODE, READONLY, ALIGN=2

                  Draw PROC
;;;36     */
;;;37     static void Draw(int x0, int y0, int XSize, int YSize, int BytesPerLine, const U8*pData) {
000000  e92d5fff          PUSH     {r0-r12,lr}
000004  4680              MOV      r8,r0
;;;38       int x, y;
;;;39       tLCD_SetPixelAA* pfSetPixelAA;
;;;40       pfSetPixelAA = (GUI_Context.TextMode && GUI_TM_TRANS) ?
;;;41                      LCD_SetPixelAA : LCD_SetPixelAA_NoTrans;
000006  481c              LDR      r0,|L1.120|
000008  4f1a              LDR      r7,|L1.116|
00000a  8d40              LDRH     r0,[r0,#0x2a]  ; GUI_Context
00000c  f8dda03c          LDR      r10,[sp,#0x3c]
000010  b900              CBNZ     r0,|L1.20|
000012  4f1a              LDR      r7,|L1.124|
                  |L1.20|
;;;42       for (y=0; y<YSize; y++) {
000014  2600              MOVS     r6,#0
000016  e028              B        |L1.106|
                  |L1.24|
;;;43         const U8*pData0 = pData;
;;;44         for (x=0; x<XSize-1; x+=2) {
000018  9802              LDR      r0,[sp,#8]
00001a  4655              MOV      r5,r10                ;43
00001c  2400              MOVS     r4,#0
00001e  f1a00b01          SUB      r11,r0,#1
000022  e012              B        |L1.74|
                  |L1.36|
;;;45           (*pfSetPixelAA)(x+x0,y0+y,   (*pData0)>>4); /* x0+x changed -> x+x0 to avoid problems with IAR's ICCMC80 */
000024  7828              LDRB     r0,[r5,#0]
000026  0902              LSRS     r2,r0,#4
000028  9801              LDR      r0,[sp,#4]
00002a  eb000906          ADD      r9,r0,r6
00002e  eb040008          ADD      r0,r4,r8
000032  4649              MOV      r1,r9
000034  47b8              BLX      r7
;;;46           (*pfSetPixelAA)(x0+x+1,y0+y, (*pData0++)&15);
000036  f8150b01          LDRB     r0,[r5],#1
00003a  4649              MOV      r1,r9
00003c  f000020f          AND      r2,r0,#0xf
000040  eb080004          ADD      r0,r8,r4
000044  1c40              ADDS     r0,r0,#1
000046  47b8              BLX      r7
000048  1ca4              ADDS     r4,r4,#2              ;44
                  |L1.74|
00004a  455c              CMP      r4,r11                ;44
00004c  dbea              BLT      |L1.36|
;;;47       	}
;;;48         if (XSize&1) {
00004e  9802              LDR      r0,[sp,#8]
000050  07c0              LSLS     r0,r0,#31
000052  d007              BEQ      |L1.100|
;;;49           (*pfSetPixelAA)(x0+x,y0+y, (*pData0)&15);
000054  7828              LDRB     r0,[r5,#0]
000056  f000020f          AND      r2,r0,#0xf
00005a  9801              LDR      r0,[sp,#4]
00005c  1981              ADDS     r1,r0,r6
00005e  eb080004          ADD      r0,r8,r4
000062  47b8              BLX      r7
                  |L1.100|
;;;50         }
;;;51         pData+=BytesPerLine;
000064  990e              LDR      r1,[sp,#0x38]
000066  1c76              ADDS     r6,r6,#1              ;42
000068  448a              ADD      r10,r10,r1
                  |L1.106|
00006a  9803              LDR      r0,[sp,#0xc]          ;42
00006c  4286              CMP      r6,r0                 ;42
00006e  dbd3              BLT      |L1.24|
;;;52       }
;;;53     }
000070  e8bd9fff          POP      {r0-r12,pc}
;;;54     
                          ENDP

                  |L1.116|
                          DCD      LCD_SetPixelAA
                  |L1.120|
                          DCD      GUI_Context
                  |L1.124|
                          DCD      LCD_SetPixelAA_NoTrans

                          AREA ||i.GUIPROP_AA4_DispChar||, CODE, READONLY, ALIGN=2

                  GUIPROP_AA4_DispChar PROC
;;;76     */
;;;77     void GUIPROP_AA4_DispChar(U16P c) {
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;78       int BytesPerLine;
;;;79       GUI_DRAWMODE DrawMode = GUI_Context.TextMode;
000004  4d14              LDR      r5,|L2.88|
000006  4604              MOV      r4,r0                 ;77
;;;80       const GUI_FONT_PROP* pProp = GUIPROP_FindChar(GUI_Context.pAFont->p.pProp, c);
000008  69a8              LDR      r0,[r5,#0x18]  ; GUI_Context
00000a  f9b5602a          LDRSH    r6,[r5,#0x2a]         ;79  ; GUI_Context
00000e  6980              LDR      r0,[r0,#0x18]
000010  4621              MOV      r1,r4
000012  f7fffffe          BL       GUIPROP_FindChar
;;;81       if (pProp) {
000016  2800              CMP      r0,#0
000018  d01c              BEQ      |L2.84|
;;;82         GUI_DRAWMODE OldDrawMode;
;;;83         const GUI_CHARINFO* pCharInfo = pProp->paCharInfo+(c-pProp->First);
00001a  6841              LDR      r1,[r0,#4]
00001c  8800              LDRH     r0,[r0,#0]
00001e  1a20              SUBS     r0,r4,r0
000020  eb0104c0          ADD      r4,r1,r0,LSL #3
;;;84         BytesPerLine = pCharInfo->BytesPerLine;
000024  78a7              LDRB     r7,[r4,#2]
;;;85         OldDrawMode  = LCD_SetDrawMode(DrawMode);
000026  4630              MOV      r0,r6
000028  f7fffffe          BL       LCD_SetDrawMode
;;;86         Draw  ( GUI_Context.DispPosX, GUI_Context.DispPosY,
00002c  6863              LDR      r3,[r4,#4]
00002e  4606              MOV      r6,r0                 ;85
000030  e9cd7300          STRD     r7,r3,[sp,#0]
000034  69a8              LDR      r0,[r5,#0x18]  ; GUI_Context
000036  7822              LDRB     r2,[r4,#0]
000038  7d03              LDRB     r3,[r0,#0x14]
00003a  f9b51024          LDRSH    r1,[r5,#0x24]  ; GUI_Context
00003e  f9b50022          LDRSH    r0,[r5,#0x22]  ; GUI_Context
000042  f7fffffe          BL       Draw
;;;87                            pCharInfo->XSize,
;;;88                            GUI_Context.pAFont->YSize,
;;;89                            BytesPerLine,
;;;90                            (U8 const*)pCharInfo->pData
;;;91                            );
;;;92         LCD_SetDrawMode(OldDrawMode); /* Restore draw mode */
000046  4630              MOV      r0,r6
000048  f7fffffe          BL       LCD_SetDrawMode
;;;93         GUI_Context.DispPosX += pCharInfo->XDist;
00004c  8c68              LDRH     r0,[r5,#0x22]  ; GUI_Context
00004e  7861              LDRB     r1,[r4,#1]
000050  4408              ADD      r0,r0,r1
000052  8468              STRH     r0,[r5,#0x22]
                  |L2.84|
;;;94       }
;;;95     }
000054  e8bd81fc          POP      {r2-r8,pc}
;;;96     
                          ENDP

                  |L2.88|
                          DCD      GUI_Context

                          AREA ||i.GUIPROP_AA4_GetCharDistX||, CODE, READONLY, ALIGN=2

                  GUIPROP_AA4_GetCharDistX PROC
;;;100    */
;;;101    int GUIPROP_AA4_GetCharDistX(U16P c) {
000000  b510              PUSH     {r4,lr}
000002  4604              MOV      r4,r0
;;;102      const GUI_FONT_PROP* pProp = GUIPROP_FindChar(GUI_Context.pAFont->p.pProp, c);
000004  4806              LDR      r0,|L3.32|
000006  4621              MOV      r1,r4
000008  6980              LDR      r0,[r0,#0x18]  ; GUI_Context
00000a  6980              LDR      r0,[r0,#0x18]
00000c  f7fffffe          BL       GUIPROP_FindChar
;;;103      return (pProp) ? (pProp->paCharInfo+(c-pProp->First))->XSize : 0;
000010  2800              CMP      r0,#0
000012  d004              BEQ      |L3.30|
000014  6841              LDR      r1,[r0,#4]
000016  8800              LDRH     r0,[r0,#0]
000018  1a20              SUBS     r0,r4,r0
00001a  f8110030          LDRB     r0,[r1,r0,LSL #3]
                  |L3.30|
;;;104    }
00001e  bd10              POP      {r4,pc}
;;;105    
                          ENDP

                  |L3.32|
                          DCD      GUI_Context

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

                  GUIPROP_AA4_GetFontInfo PROC
;;;109    */
;;;110    void GUIPROP_AA4_GetFontInfo(const GUI_FONT * pFont, GUI_FONTINFO* pfi) {
000000  2011              MOVS     r0,#0x11
;;;111      GUI_USE_PARA(pFont);
;;;112      pfi->Flags = GUI_FONTINFO_FLAG_PROP | GUI_FONTINFO_FLAG_AA4;
000002  8008              STRH     r0,[r1,#0]
;;;113    }
000004  4770              BX       lr
;;;114    
                          ENDP


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

                  GUIPROP_AA4_IsInFont PROC
;;;118    */
;;;119    char GUIPROP_AA4_IsInFont(const GUI_FONT * pFont, U16 c) {
000000  b510              PUSH     {r4,lr}
;;;120      const GUI_FONT_PROP* pProp = GUIPROP_FindChar(pFont->p.pProp, c);
000002  6980              LDR      r0,[r0,#0x18]
000004  f7fffffe          BL       GUIPROP_FindChar
;;;121      return (pProp==NULL) ? 0 : 1;
000008  2800              CMP      r0,#0
00000a  d000              BEQ      |L5.14|
00000c  2001              MOVS     r0,#1
                  |L5.14|
;;;122    }
00000e  bd10              POP      {r4,pc}
;;;123    
                          ENDP


                          AREA ||i.GUIPROP_FindChar||, CODE, READONLY, ALIGN=2

                  GUIPROP_FindChar PROC
;;;58     */
;;;59     static const GUI_FONT_PROP* GUIPROP_FindChar(const GUI_FONT_PROP* pProp, U16P c) {
000000  4806              LDR      r0,|L6.28|
;;;60       for (pProp = GUI_Context.pAFont->p.pProp; pProp; pProp=(const GUI_FONT_PROP*) pProp->pNext) {
000002  6980              LDR      r0,[r0,#0x18]  ; GUI_Context
000004  6980              LDR      r0,[r0,#0x18]
000006  e006              B        |L6.22|
                  |L6.8|
;;;61         if ((c>=pProp->First) && (c<=pProp->Last))
000008  8802              LDRH     r2,[r0,#0]
00000a  428a              CMP      r2,r1
00000c  d802              BHI      |L6.20|
00000e  8842              LDRH     r2,[r0,#2]
000010  428a              CMP      r2,r1
000012  d202              BCS      |L6.26|
                  |L6.20|
000014  6880              LDR      r0,[r0,#8]            ;60
                  |L6.22|
000016  2800              CMP      r0,#0                 ;60
000018  d1f6              BNE      |L6.8|
                  |L6.26|
;;;62           break;
;;;63       }
;;;64       return pProp;
;;;65     }
00001a  4770              BX       lr
;;;66     
                          ENDP

                  |L6.28|
                          DCD      GUI_Context

⌨️ 快捷键说明

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