📄 guicharm.txt
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\guicharm.o --depend=.\Obj\guicharm.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\GUICharM.c]
THUMB
AREA ||i.GUIMONO_DispChar||, CODE, READONLY, ALIGN=2
GUIMONO_DispChar PROC
;;;38 */
;;;39 void GUIMONO_DispChar(U16P c) {
000000 e92d4ff0 PUSH {r4-r11,lr}
;;;40 int c0, c1;
;;;41 const unsigned char GUI_UNI_PTR * pd;
;;;42 int x = GUI_Context.DispPosX;
000004 f8dfb120 LDR r11,|L1.296|
000008 b08b SUB sp,sp,#0x2c ;39
00000a f9bb2022 LDRSH r2,[r11,#0x22] ; GUI_Context
;;;43 int y = GUI_Context.DispPosY;
00000e f9bba024 LDRSH r10,[r11,#0x24] ; GUI_Context
;;;44 /* do some checking if drawing is actually necessary ... */
;;;45 const GUI_FONT_MONO GUI_UNI_PTR * pMono = GUI_Context.pAFont->p.pMono;
000012 920a STR r2,[sp,#0x28]
000014 f8db2018 LDR r2,[r11,#0x18] ; GUI_Context
;;;46 unsigned int FirstChar = pMono->FirstChar;
;;;47 /* translate character into 2 characters to display : c0,c1 */
;;;48 /* Check if regular character first. */
;;;49 if ((c >= (U16P)FirstChar) &&(c <= (U16P)pMono->LastChar)) {
;;;50 pd = pMono->pData;
;;;51 c0 = ((int)c) - FirstChar;
;;;52 c1 = -1;
000018 f04f36ff MOV r6,#0xffffffff
00001c 6994 LDR r4,[r2,#0x18] ;46
00001e 89a1 LDRH r1,[r4,#0xc] ;46
000020 4288 CMP r0,r1 ;49
000022 d305 BCC |L1.48|
000024 89e3 LDRH r3,[r4,#0xe] ;49
000026 4283 CMP r3,r0 ;49
000028 d302 BCC |L1.48|
00002a 1a45 SUBS r5,r0,r1 ;51
00002c 6827 LDR r7,[r4,#0]
00002e e013 B |L1.88|
|L1.48|
;;;53 } else {
;;;54 /* Check if character is in translation table */
;;;55 GUI_FONT_TRANSINFO const GUI_UNI_PTR * pti = pMono->pTrans;
;;;56 pd = pMono->pTransData;
;;;57 if (pti) {
000030 e9d47101 LDRD r7,r1,[r4,#4]
000034 b179 CBZ r1,|L1.86|
;;;58 FirstChar = pti->FirstChar;
000036 880b LDRH r3,[r1,#0]
;;;59 if ((c >= (U16P)FirstChar) && (c <= (U16P)pti->LastChar)) {
000038 4298 CMP r0,r3
00003a d30c BCC |L1.86|
00003c 884d LDRH r5,[r1,#2]
00003e 4285 CMP r5,r0
000040 d309 BCC |L1.86|
;;;60 GUI_FONT_TRANSLIST const GUI_UNI_PTR * ptl;
;;;61 c -= pti->FirstChar;
000042 1ac0 SUBS r0,r0,r3
;;;62 ptl = pti->pList;
000044 6849 LDR r1,[r1,#4]
000046 b280 UXTH r0,r0 ;61
;;;63 ptl += c;
000048 eb010080 ADD r0,r1,r0,LSL #2
;;;64 c0 = ptl->c0;
00004c f9b05000 LDRSH r5,[r0,#0]
;;;65 c1 = ptl->c1;
000050 f9b06002 LDRSH r6,[r0,#2]
;;;66 } else {
000054 e000 B |L1.88|
|L1.86|
;;;67 c0 = c1 = -1;
000056 4635 MOV r5,r6
|L1.88|
;;;68 }
;;;69 } else {
;;;70 c0 = c1 = -1;
;;;71 }
;;;72 }
;;;73 /* Draw first character if it is valid */
;;;74 if (c0!=-1) {
000058 1c68 ADDS r0,r5,#1
00005a d058 BEQ |L1.270|
;;;75 int BytesPerChar = GUI_Context.pAFont->YSize*pMono->BytesPerLine;
00005c 7d10 LDRB r0,[r2,#0x14]
00005e 7ca1 LDRB r1,[r4,#0x12]
000060 fb00f901 MUL r9,r0,r1
;;;76 GUI_DRAWMODE DrawMode;
;;;77 int XSize = pMono->XSize;
000064 7c21 LDRB r1,[r4,#0x10]
;;;78 int YSize = GUI_Context.pAFont->YSize;
;;;79 /* Select the right drawing mode */
;;;80 DrawMode = GUI_Context.TextMode;
000066 e9cd0108 STRD r0,r1,[sp,#0x20]
00006a f9bb802a LDRSH r8,[r11,#0x2a] ; GUI_Context
;;;81 /* call drawing routine */
;;;82 {
;;;83 U8 OldMode = LCD_SetDrawMode(DrawMode);
00006e 4640 MOV r0,r8
000070 f7fffffe BL LCD_SetDrawMode
000074 b2c0 UXTB r0,r0
;;;84 LCD_DrawBitmap( x, y,
000076 fb057209 MLA r2,r5,r9,r7
00007a 9007 STR r0,[sp,#0x1c]
00007c 4b2a LDR r3,|L1.296|
00007e 7ca1 LDRB r1,[r4,#0x12]
000080 2001 MOVS r0,#1
000082 ad02 ADD r5,sp,#8
000084 c50f STM r5!,{r0-r3}
000086 f8db0018 LDR r0,[r11,#0x18] ; GUI_Context
00008a 4651 MOV r1,r10
00008c 7dc3 LDRB r3,[r0,#0x17]
00008e 7d82 LDRB r2,[r0,#0x16]
000090 e9cd2300 STRD r2,r3,[sp,#0]
000094 e9dd3208 LDRD r3,r2,[sp,#0x20]
000098 980a LDR r0,[sp,#0x28]
00009a f7fffffe BL LCD_DrawBitmap
;;;85 XSize, YSize,
;;;86 GUI_Context.pAFont->XMag, GUI_Context.pAFont->YMag,
;;;87 1, /* Bits per Pixel */
;;;88 pMono->BytesPerLine,
;;;89 pd + c0* BytesPerChar,
;;;90 &LCD_BKCOLORINDEX
;;;91 );
;;;92 if (c1 != -1) {
00009e 1c70 ADDS r0,r6,#1
0000a0 d016 BEQ |L1.208|
;;;93 LCD_SetDrawMode(DrawMode | LCD_DRAWMODE_TRANS);
0000a2 f0480002 ORR r0,r8,#2
0000a6 f7fffffe BL LCD_SetDrawMode
;;;94 LCD_DrawBitmap( x, y,
0000aa fb067209 MLA r2,r6,r9,r7
0000ae 4b1e LDR r3,|L1.296|
0000b0 7ca1 LDRB r1,[r4,#0x12]
0000b2 2001 MOVS r0,#1
0000b4 ad02 ADD r5,sp,#8
0000b6 c50f STM r5!,{r0-r3}
0000b8 f8db0018 LDR r0,[r11,#0x18] ; GUI_Context
0000bc 4651 MOV r1,r10
0000be 7dc3 LDRB r3,[r0,#0x17]
0000c0 7d82 LDRB r2,[r0,#0x16]
0000c2 e9cd2300 STRD r2,r3,[sp,#0]
0000c6 e9dd3208 LDRD r3,r2,[sp,#0x20]
0000ca 980a LDR r0,[sp,#0x28]
0000cc f7fffffe BL LCD_DrawBitmap
|L1.208|
;;;95 XSize, YSize,
;;;96 GUI_Context.pAFont->XMag, GUI_Context.pAFont->YMag,
;;;97 1, /* Bits per Pixel */
;;;98 pMono->BytesPerLine,
;;;99 pd + c1* BytesPerChar,
;;;100 &LCD_BKCOLORINDEX
;;;101 );
;;;102 }
;;;103 /* Fill empty pixel lines */
;;;104 if (GUI_Context.pAFont->YDist > GUI_Context.pAFont->YSize) {
0000d0 f8db0018 LDR r0,[r11,#0x18] ; GUI_Context
0000d4 465d MOV r5,r11
0000d6 7d01 LDRB r1,[r0,#0x14]
0000d8 7d40 LDRB r0,[r0,#0x15]
0000da 4288 CMP r0,r1
0000dc d914 BLS |L1.264|
;;;105 if (DrawMode != LCD_DRAWMODE_TRANS) {
0000de f1b80f02 CMP r8,#2
0000e2 d011 BEQ |L1.264|
;;;106 LCD_SetDrawMode(DrawMode ^ LCD_DRAWMODE_REV); /* Reverse so we can fill with BkColor */
0000e4 f0880004 EOR r0,r8,#4
0000e8 f7fffffe BL LCD_SetDrawMode
;;;107 LCD_FillRect(x,
0000ec 69a8 LDR r0,[r5,#0x18] ; GUI_Context
0000ee 7d03 LDRB r3,[r0,#0x14]
0000f0 7d42 LDRB r2,[r0,#0x15]
0000f2 7d85 LDRB r5,[r0,#0x16]
0000f4 fb03a102 MLA r1,r3,r2,r10
0000f8 eb02030a ADD r3,r2,r10
0000fc e9dd2009 LDRD r2,r0,[sp,#0x24]
000100 fb020205 MLA r2,r2,r5,r0
000104 f7fffffe BL LCD_FillRect
|L1.264|
;;;108 y + GUI_Context.pAFont->YSize * GUI_Context.pAFont->YDist,
;;;109 x + XSize * GUI_Context.pAFont->XMag,
;;;110 y + GUI_Context.pAFont->YDist);
;;;111 }
;;;112 }
;;;113 LCD_SetDrawMode(OldMode);
000108 9807 LDR r0,[sp,#0x1c]
00010a f7fffffe BL LCD_SetDrawMode
|L1.270|
;;;114 }
;;;115 }
;;;116 //houhh 20061119...
;;;117 // GUI_Context.DispPosX+=pMono->XDist;
;;;118 GUI_Context.DispPosX+=pMono->XDist * GUI_Context.pAFont->XMag;
00010e f8db3018 LDR r3,[r11,#0x18] ; GUI_Context
000112 f9bb1022 LDRSH r1,[r11,#0x22] ; GUI_Context
000116 7c62 LDRB r2,[r4,#0x11]
000118 7d9b LDRB r3,[r3,#0x16]
00011a fb021103 MLA r1,r2,r3,r1
00011e f8ab1022 STRH r1,[r11,#0x22]
;;;119
;;;120 }
000122 b00b ADD sp,sp,#0x2c
000124 e8bd8ff0 POP {r4-r11,pc}
;;;121
ENDP
|L1.296|
DCD GUI_Context
AREA ||i.GUIMONO_GetCharDistX||, CODE, READONLY, ALIGN=2
GUIMONO_GetCharDistX PROC
;;;125 */
;;;126 int GUIMONO_GetCharDistX(U16P c) {
000000 4803 LDR r0,|L2.16|
;;;127 const GUI_FONT_MONO GUI_UNI_PTR * pMono = GUI_Context.pAFont->p.pMono;
000002 6981 LDR r1,[r0,#0x18] ; GUI_Context
;;;128 GUI_USE_PARA(c);
;;;129 // return pMono->XDist;
;;;130 //houhh 20061119...
;;;131 return pMono->XDist*GUI_Context.pAFont->XMag;
000004 6988 LDR r0,[r1,#0x18]
000006 7d89 LDRB r1,[r1,#0x16]
000008 7c40 LDRB r0,[r0,#0x11]
00000a 4348 MULS r0,r1,r0
;;;132
;;;133 }
00000c 4770 BX lr
;;;134
ENDP
00000e 0000 DCW 0x0000
|L2.16|
DCD GUI_Context
AREA ||i.GUIMONO_GetFontInfo||, CODE, READONLY, ALIGN=1
GUIMONO_GetFontInfo PROC
;;;138 */
;;;139 void GUIMONO_GetFontInfo(const GUI_FONT GUI_UNI_PTR * pFont, GUI_FONTINFO* pfi) {
000000 2002 MOVS r0,#2
;;;140 GUI_USE_PARA(pFont);
;;;141 pfi->Flags = GUI_FONTINFO_FLAG_MONO;
000002 8008 STRH r0,[r1,#0]
;;;142 }
000004 4770 BX lr
;;;143
ENDP
AREA ||i.GUIMONO_IsInFont||, CODE, READONLY, ALIGN=1
GUIMONO_IsInFont PROC
;;;147 */
;;;148 char GUIMONO_IsInFont(const GUI_FONT GUI_UNI_PTR * pFont, U16 c) {
000000 6980 LDR r0,[r0,#0x18]
;;;149 const GUI_FONT_MONO GUI_UNI_PTR * pMono = pFont->p.pMono;
;;;150 unsigned int FirstChar = pMono->FirstChar;
000002 8982 LDRH r2,[r0,#0xc]
;;;151 /* Check if regular character first. */
;;;152 if ((c >= (U16P)FirstChar) &&(c <= (U16P)pMono->LastChar)) {
000004 4291 CMP r1,r2
000006 d302 BCC |L4.14|
000008 89c2 LDRH r2,[r0,#0xe]
00000a 428a CMP r2,r1
00000c d207 BCS |L4.30|
|L4.14|
;;;153 return 1; /* Yes, we have it ! */
;;;154 } else {
;;;155 /* Check if character is in translation table */
;;;156 GUI_FONT_TRANSINFO const GUI_UNI_PTR * pti;
;;;157 pti = pMono->pTrans;
00000e 6880 LDR r0,[r0,#8]
;;;158 if (pti) {
000010 b138 CBZ r0,|L4.34|
;;;159 if ((c >= pti->FirstChar) && (c <= pti->LastChar)) {
000012 8802 LDRH r2,[r0,#0]
000014 428a CMP r2,r1
000016 d804 BHI |L4.34|
000018 8840 LDRH r0,[r0,#2]
00001a 4288 CMP r0,r1
00001c d301 BCC |L4.34|
|L4.30|
;;;160 return 1; /* Yes, we have it ! */
00001e 2001 MOVS r0,#1
;;;161 }
;;;162 }
;;;163 }
;;;164 return 0; /* No, we can not display this character */
;;;165 }
000020 4770 BX lr
|L4.34|
000022 2000 MOVS r0,#0 ;164
000024 4770 BX lr
;;;166
ENDP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -