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

📄 picdecode.cod

📁 平台PXA270, Mobile6.0 这是270的mobile6.0的bootloader
💻 COD
📖 第 1 页 / 共 2 页
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4345 

	TTL	E:\WM604\PLATFORM\SEUICBSP\SRC\BOOTLOADER\EBOOT\.\PicDecode.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "


  00000			 AREA	 |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
	DCW	0x0
	DCD	0x4033
	DCB	0x1
	DCB	"AD", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x4005
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x1050
	DCW	0x940
	DCD	0x2078
	DCB	0x1
	DCB	"LS", 0x0
	DCW	0x10ec
	DCW	0x8029
	DCD	0xc0f0
	DCB	0x1
	DCB	"KS", 0x0
	DCW	0x10ec
	DCW	0x8129
	DCD	0x0
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0x900b
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xd0c9
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x10ec
	DCW	0x8139
	DCD	0xe04c
	DCB	0x4
	DCB	"RT", 0x0
	DCW	0x1186
	DCW	0x1300
	DCD	0x50ba
	DCB	0x4
	DCB	"DL", 0x0
	DCW	0x100b
	DCW	0x20
	DCD	0xa0cc
	DCB	0x5
	DCB	"NG", 0x0
	DCW	0x10b7
	DCW	0x9050
	DCD	0x6008
	DCB	0x6
	DCB	"3C", 0x0
	DCW	0x10b7
	DCW	0x9200
	DCD	0x476
	DCB	0x6
	DCB	"3C", 0x0
	EXPORT	|Pic_Open|
	IMPORT	|memset|
	IMPORT	|memcpy|

  00000			 AREA	 |.bss|, NOINIT
|handle| %	0x2c
; File e:\wm604\platform\seuicbsp\src\bootloader\eboot\picdecode.c

  00000			 AREA	 |.text| { |Pic_Open| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Pic_Open|, PDATA, SELECTION=5, ASSOC=|.text| { |Pic_Open| } ; comdat associative
|$T42722| DCD	|$L42721|
	DCD	0x40003f01
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Pic_Open| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Pic_Open| PROC

; 68   : {

  00000		 |$L42721|
  00000	e92d4030	 stmdb       sp!, {r4, r5, lr}
  00004		 |$M42719|
  00004	e1b05000	 movs        r5, r0

; 69   :     UINT8 gray=0,scan=0;
; 70   : 
; 71   :     if(base == NULL) return NULL;

  00008	0a000036	 beq         |$Pic_Open_Error$42557|

; 72   :     memset((char *)&handle,0,sizeof(PicHandle));

  0000c	e59f40e4	 ldr         r4, [pc, #0xE4]
  00010	e3a0202c	 mov         r2, #0x2C
  00014	e3a01000	 mov         r1, #0
  00018	e1a00004	 mov         r0, r4
  0001c	eb000000	 bl          memset

; 73   : 
; 74   :     handle.baseaddr = base;
; 75   :     memcpy((char *)(&(handle.head)),base,sizeof(HeadGray));

  00020	e2840004	 add         r0, r4, #4
  00024	e3a02006	 mov         r2, #6
  00028	e1a01005	 mov         r1, r5
  0002c	e5845000	 str         r5, [r4]
  00030	eb000000	 bl          memcpy

; 76   :     gray = handle.head.gray;
; 77   :     scan = handle.head.scan;
; 78   :     //只支持1位和8位图像
; 79   :     if((gray!=1)&&(gray!=8)) goto Pic_Open_Error;

  00034	e5d41005	 ldrb        r1, [r4, #5]
  00038	e3510001	 cmp         r1, #1
  0003c	0a000001	 beq         |$L42556|
  00040	e3510008	 cmp         r1, #8
  00044	1a000027	 bne         |$Pic_Open_Error$42557|
  00048		 |$L42556|

; 80   :     //只支持从左往右、从顶至低及LSB字节顺序的图像
; 81   :     if((scan&SCAN_RIGHT_2_LEFT)||(scan&SCAN_BOTTOM_2_TOP)||(scan&SCAN_MSB_FIRST))

  00048	e5d43004	 ldrb        r3, [r4, #4]
  0004c	e3130080	 tst         r3, #0x80
  00050	1a000024	 bne         |$Pic_Open_Error$42557|
  00054	e3130040	 tst         r3, #0x40
  00058	1a000022	 bne         |$Pic_Open_Error$42557|
  0005c	e3130010	 tst         r3, #0x10
  00060	1a000020	 bne         |$Pic_Open_Error$42557|

; 82   :         goto Pic_Open_Error;
; 83   :     handle.byteorder = scan&SCAN_BYTE_LOW2HIGH;

  00064	e2033020	 and         r3, r3, #0x20

; 84   :     base += sizeof(HeadGray);

  00068	e2852006	 add         r2, r5, #6

; 85   :     //当为8位图时,读取调色板
; 86   :     if(gray == 8){

  0006c	e3510008	 cmp         r1, #8
  00070	e5843018	 str         r3, [r4, #0x18]

; 87   :         handle.palnum = *(UINT16 *)base;

  00074	00d230b2	 ldreqh      r3, [r2], #2

; 88   :         base += sizeof(UINT16);
; 89   :         handle.ppal = (PalEntry *)base;
; 90   :         base += handle.palnum * sizeof(PalEntry);
; 91   :         handle.mode = 0;

  00078	03a01000	 moveq       r1, #0
  0007c	01c431bc	 streqh      r3, [r4, #0x1C]
  00080	00833083	 addeq       r3, r3, r3, lsl #1
  00084	05842020	 streq       r2, [r4, #0x20]
  00088	00822003	 addeq       r2, r2, r3

; 92   :     }
; 93   :     else{
; 94   :         handle.mode = 1;

  0008c	13a03001	 movne       r3, #1
  00090	05841024	 streq       r1, [r4, #0x24]
  00094	15843024	 strne       r3, [r4, #0x24]

; 95   :         }
; 96   :     handle.pdata = base;
; 97   :     //设置缺省输出宽度和高度
; 98   :     handle.output_width = DEFAULT_OUT_WIDTH;

  00098	e3a030f0	 mov         r3, #0xF0
  0009c	e5842028	 str         r2, [r4, #0x28]
  000a0	e1c430ba	 strh        r3, [r4, #0xA]

; 99   :     handle.output_hight = DEFAULT_OUT_HIGHT;

  000a4	e3a03d05	 mov         r3, #5, 26
  000a8	e1c430bc	 strh        r3, [r4, #0xC]

; 100  :     //设置输入图像在输出图像中的位置
; 101  :     handle.left = (DEFAULT_OUT_WIDTH - handle.head.w)/2;

  000ac	e1d420b6	 ldrh        r2, [r4, #6]

; 102  :     handle.right = handle.left + handle.head.w;
; 103  :     handle.top =  (DEFAULT_OUT_HIGHT - handle.head.h)/2;
; 104  :     handle.bottom = handle.top + handle.head.h;
; 105  :     
; 106  :     return &handle;

  000b0	e26230f0	 rsb         r3, r2, #0xF0
  000b4	e0833fa3	 add         r3, r3, r3, lsr #31
  000b8	e1a030c3	 mov         r3, r3, asr #1
  000bc	e0832002	 add         r2, r3, r2
  000c0	e1c431b2	 strh        r3, [r4, #0x12]
  000c4	e1c421b4	 strh        r2, [r4, #0x14]
  000c8	e1d420b8	 ldrh        r2, [r4, #8]
  000cc	e2623d05	 rsb         r3, r2, #5, 26
  000d0	e0833fa3	 add         r3, r3, r3, lsr #31
  000d4	e1a030c3	 mov         r3, r3, asr #1
  000d8	e0832002	 add         r2, r3, r2
  000dc	e1c430be	 strh        r3, [r4, #0xE]
  000e0	e1c421b0	 strh        r2, [r4, #0x10]
  000e4	ea000000	 b           |$L42546|
  000e8		 |$Pic_Open_Error$42557|

; 107  : 
; 108  : Pic_Open_Error:
; 109  :     return NULL;

  000e8	e3a04000	 mov         r4, #0
  000ec		 |$L42546|

; 69   :     UINT8 gray=0,scan=0;
; 70   : 
; 71   :     if(base == NULL) return NULL;

  000ec	e1a00004	 mov         r0, r4

; 110  : }

  000f0	e8bd4030	 ldmia       sp!, {r4, r5, lr}
  000f4	e12fff1e	 bx          lr
  000f8		 |$L42724|
  000f8	00000000	 DCD         |handle|
  000fc		 |$M42720|

			 ENDP  ; |Pic_Open|

	EXPORT	|Pic_Close|

  00000			 AREA	 |.text| { |Pic_Close| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Pic_Close|, PDATA, SELECTION=5, ASSOC=|.text| { |Pic_Close| } ; comdat associative
|$T42730| DCD	|$L42729|
	DCD	0x40000100
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Pic_Close| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Pic_Close| PROC

; 113  : {

  00000		 |$L42729|
  00000		 |$M42727|

; 114  :     PicHandle *handle = (PicHandle *)h;
; 115  : }

  00000	e12fff1e	 bx          lr
  00004		 |$M42728|

			 ENDP  ; |Pic_Close|

	EXPORT	|Pic_GetWidth|

  00000			 AREA	 |.text| { |Pic_GetWidth| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Pic_GetWidth|, PDATA, SELECTION=5, ASSOC=|.text| { |Pic_GetWidth| } ; comdat associative
|$T42740| DCD	|$L42739|
	DCD	0x40000600
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Pic_GetWidth| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Pic_GetWidth| PROC

; 118  : {

  00000		 |$L42739|
  00000		 |$M42737|
  00000	e3500000	 cmp         r0, #0

; 119  :     PicHandle *handle = (PicHandle *)h;
; 120  :     if(h == NULL) return 0;

  00004	03a00000	 moveq       r0, #0

; 121  :     return handle->head.w;

  00008	15d02006	 ldrneb      r2, [r0, #6]
  0000c	15d03007	 ldrneb      r3, [r0, #7]
  00010	11820403	 orrne       r0, r2, r3, lsl #8

; 122  : }

  00014	e12fff1e	 bx          lr
  00018		 |$M42738|

			 ENDP  ; |Pic_GetWidth|

	EXPORT	|Pic_GetHight|

  00000			 AREA	 |.text| { |Pic_GetHight| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Pic_GetHight|, PDATA, SELECTION=5, ASSOC=|.text| { |Pic_GetHight| } ; comdat associative
|$T42750| DCD	|$L42749|
	DCD	0x40000600
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Pic_GetHight| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Pic_GetHight| PROC

; 125  : {

  00000		 |$L42749|
  00000		 |$M42747|
  00000	e3500000	 cmp         r0, #0

; 126  :     PicHandle *handle = (PicHandle *)h;
; 127  :     if(h == NULL) return 0;

  00004	03a00000	 moveq       r0, #0

; 128  :     return handle->head.h;

  00008	15d02008	 ldrneb      r2, [r0, #8]
  0000c	15d03009	 ldrneb      r3, [r0, #9]
  00010	11820403	 orrne       r0, r2, r3, lsl #8

; 129  : }

  00014	e12fff1e	 bx          lr
  00018		 |$M42748|

			 ENDP  ; |Pic_GetHight|

	EXPORT	|Pic_SetOutputSize|

  00000			 AREA	 |.text| { |Pic_SetOutputSize| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$Pic_SetOutputSize|, PDATA, SELECTION=5, ASSOC=|.text| { |Pic_SetOutputSize| } ; comdat associative
|$T42762| DCD	|$L42761|
	DCD	0x40002301
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |Pic_SetOutputSize| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |Pic_SetOutputSize| PROC

; 137  : {

  00000		 |$L42761|
  00000	e92d40f0	 stmdb       sp!, {r4 - r7, lr}
  00004		 |$M42759|
  00004	e1a06002	 mov         r6, r2
  00008	e1a04001	 mov         r4, r1
  0000c	e1b0e000	 movs        lr, r0

; 138  :     PicHandle *handle = (PicHandle *)h;
; 139  :     if(h == NULL) return FALSE;

  00010	0a00001a	 beq         |$L42599|

; 140  :     
; 141  :     if((width<handle->head.w)||(hight<handle->head.h))

  00014	e5de2006	 ldrb        r2, [lr, #6]
  00018	e5de3007	 ldrb        r3, [lr, #7]
  0001c	e1825403	 orr         r5, r2, r3, lsl #8
  00020	e1540005	 cmp         r4, r5
  00024	3a000015	 bcc         |$L42599|
  00028	e5de2008	 ldrb        r2, [lr, #8]
  0002c	e5de3009	 ldrb        r3, [lr, #9]
  00030	e1827403	 orr         r7, r2, r3, lsl #8
  00034	e1560007	 cmp         r6, r7
  00038	3a000010	 bcc         |$L42599|

; 143  :     
; 144  :     handle->output_width = width;
; 145  :     handle->output_hight = hight;
; 146  : 
; 147  :     //设置输入图像在输出图像中的位置
; 148  :     handle->left = (handle->output_width - handle->head.w)/2;

  0003c	e0443005	 sub         r3, r4, r5

; 149  :     handle->right = handle->left + handle->head.w;
; 150  :     handle->top =  (handle->output_hight - handle->head.h)/2;

  00040	e0462007	 sub         r2, r6, r7
  00044	e0833fa3	 add         r3, r3, r3, lsr #31
  00048	e0822fa2	 add         r2, r2, r2, lsr #31
  0004c	e1a010c3	 mov         r1, r3, asr #1
  00050	e1a000c2	 mov         r0, r2, asr #1
  00054	e0813005	 add         r3, r1, r5

; 151  :     handle->bottom = handle->top + handle->head.h;

  00058	e0802007	 add         r2, r0, r7
  0005c	e1ce00be	 strh        r0, [lr, #0xE]
  00060	e1ce31b4	 strh        r3, [lr, #0x14]
  00064	e1ce21b0	 strh        r2, [lr, #0x10]
  00068	e1ce40ba	 strh        r4, [lr, #0xA]
  0006c	e1ce60bc	 strh        r6, [lr, #0xC]
  00070	e1ce11b2	 strh        r1, [lr, #0x12]

; 152  : //    EdbgOutputDebugString("l=%d;r=%d;t=%d;b=%d;\r\n",(int)handle->left,(int)handle->right,(int)handle->top,(int)handle->bottom);
; 153  :     return TRUE;

  00074	e3a00001	 mov         r0, #1

; 154  : }

  00078	e8bd40f0	 ldmia       sp!, {r4 - r7, lr}
  0007c	e12fff1e	 bx          lr
  00080		 |$L42599|

; 142  :         return FALSE;

  00080	e3a00000	 mov         r0, #0

; 154  : }

  00084	e8bd40f0	 ldmia       sp!, {r4 - r7, lr}
  00088	e12fff1e	 bx          lr
  0008c		 |$M42760|

			 ENDP  ; |Pic_SetOutputSize|

	EXPORT	|Pic_GetPalNum|

  00000			 AREA	 |.text| { |Pic_GetPalNum| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

⌨️ 快捷键说明

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