📄 srec.lst
字号:
GAS LISTING /tmp/ccHaeCoR.s page 1 1 .section .mdebug.abi32 2 .previous 3 .section .debug_abbrev,"",@progbits 4 $Ldebug_abbrev0: 5 .section .debug_info,"",@progbits 6 $Ldebug_info0: 7 .section .debug_line,"",@progbits 8 $Ldebug_line0: 9 0000 6F010000 .text 9 02008F00 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .align 2 12 .ent srecRead 13 .type srecRead, @function 14 srecRead: 15 $LFB2: 16 .file 1 "/mnt/hgfs/boot/booter/source/applications/booter/srec.c" 1:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** /*********************************************************************
2:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
3:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * Copyright:
4:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * MOTOROLA, INC. All Rights Reserved.
5:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * You are hereby granted a copyright license to use, modify, and
6:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * distribute the SOFTWARE so long as this entire notice is
7:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * retained without alteration in any modified and/or redistributed
8:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * versions, and that such modified versions are clearly identified
9:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * as such. No licenses are granted by implication, estoppel or
10:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * otherwise under any patents or trademarks of Motorola, Inc. This
11:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * software is provided on an "AS IS" basis and without warranty.
12:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
13:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * To the maximum extent permitted by applicable law, MOTOROLA
14:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING
15:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
16:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE
17:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY
18:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * ACCOMPANYING WRITTEN MATERIALS.
19:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
20:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * To the maximum extent permitted by applicable law, IN NO EVENT
21:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
22:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
23:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
24:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
25:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
26:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * Motorola assumes no responsibility for the maintenance and support
27:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * of this software
28:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** ********************************************************************/
29:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
30:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** /*
31:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * File: srec.c
32:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * Purpose: Routines to download Motorola S-Records.
33:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
34:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * Notes:
35:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
36:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
37:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * Modifications:
GAS LISTING /tmp/ccHaeCoR.s page 2 38:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
39:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** */
40:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
41:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** #include "srec.h"
42:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** #include "util.h"
43:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
44:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** DataFunctions fileAccessFunctions;
45:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
46:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** /********************************************************************/
47:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** static int
48:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** srecRead (void *buffer, int bytes)
49:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
17 .loc 1 49 0 18 .frame $sp,24,$31 # vars= 0, regs= 2/0, args= 16, gp= 0 19 .mask 0x80010000,-4 20 .fmask 0x00000000,0 21 .set noreorder 22 .set nomacro 23 50:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** int bytesRead = fileAccessFunctions.read(buffer, bytes);
24 .loc 1 50 0 25 0000 0000033C lui $3,%hi(fileAccessFunctions+8) 26 0004 0800628C lw $2,%lo(fileAccessFunctions+8)($3) 27 .loc 1 49 0 28 0008 E8FFBD27 addiu $sp,$sp,-24 29 $LCFI0: 30 000c 1400BFAF sw $31,20($sp) 31 $LCFI1: 32 .loc 1 49 0 33 $LCFI2: 34 .loc 1 50 0 35 0010 09F84000 jal $2 36 0014 1000B0AF sw $16,16($sp) 37 38 0018 21804000 move $16,$2 51:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** updateProgress(bytesRead);
39 .loc 1 51 0 40 001c 0000000C jal updateProgress 41 0020 21204000 move $4,$2 42 52:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** return bytesRead;
53:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
43 .loc 1 53 0 44 0024 21100002 move $2,$16 45 0028 1400BF8F lw $31,20($sp) 46 002c 1000B08F lw $16,16($sp) 47 0030 0800E003 j $31 48 0034 1800BD27 addiu $sp,$sp,24 49 50 .set macro 51 .set reorder 52 $LFE2: 53 .end srecRead 54 .align 2 55 .globl getStype 56 .ent getStype 57 .type getStype, @functionGAS LISTING /tmp/ccHaeCoR.s page 3 58 getStype: 59 $LFB3: 54:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
55:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** int getStype(char* type)
56:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
60 .loc 1 56 0 61 .frame $sp,32,$31 # vars= 8, regs= 2/0, args= 16, gp= 0 62 .mask 0x80010000,-4 63 .fmask 0x00000000,0 64 .set noreorder 65 .set nomacro 66 67 0038 E0FFBD27 addiu $sp,$sp,-32 68 $LCFI3: 69 003c 1800B0AF sw $16,24($sp) 70 $LCFI4: 57:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** /*
58:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * This routine skips all characters until an `S' is received.
59:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * It then returns the next character.
60:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * This routine is here in order to not echo characters back
61:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * out as they are received during a download.
62:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *
63:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * This code ignores NL,CR-LF end of line issues by waiting
64:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** * for 'S'.
65:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** */
66:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** char ch;
67:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** if(srecRead(&ch, 1) && ch == 'S')
71 .loc 1 67 0 72 0040 01000524 li $5,1 # 0x1 73 .loc 1 56 0 74 0044 21808000 move $16,$4 75 0048 1C00BFAF sw $31,28($sp) 76 $LCFI5: 77 .loc 1 67 0 78 004c 0000000C jal srecRead 79 0050 1000A427 addiu $4,$sp,16 80 68:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
69:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** if(srecRead(&ch, 1))
70:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
71:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *type = charToInt(ch);
72:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** return 1;
73:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
74:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
75:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
76:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** return 0;
81 .loc 1 76 0 82 .loc 1 67 0 83 0054 07004010 beq $2,$0,$L2 84 0058 21180000 move $3,$0 85 86 005c 1000A383 lb $3,16($sp) 87 0060 53000224 li $2,83 # 0x53 88 .loc 1 69 0 89 0064 1000A427 addiu $4,$sp,16 90 .loc 1 67 0 91 0068 07006210 beq $3,$2,$L6GAS LISTING /tmp/ccHaeCoR.s page 4 92 006c 01000524 li $5,1 # 0x1 93 94 $L3: 95 .loc 1 76 0 96 0070 21180000 move $3,$0 97 $L2: 77:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
98 .loc 1 77 0 99 0074 1C00BF8F lw $31,28($sp) 100 0078 1800B08F lw $16,24($sp) 101 007c 21106000 move $2,$3 102 0080 0800E003 j $31 103 0084 2000BD27 addiu $sp,$sp,32 104 105 $L6: 106 .loc 1 69 0 107 0088 0000000C jal srecRead 108 008c 00000000 nop 109 110 0090 F7FF4010 beq $2,$0,$L3 111 0094 00000000 nop 112 113 .loc 1 71 0 114 0098 0000000C jal charToInt 115 009c 1000A483 lb $4,16($sp) 116 117 .loc 1 72 0 118 00a0 01000324 li $3,1 # 0x1 119 .loc 1 71 0 120 00a4 1D000008 j $L2 121 00a8 000002A2 sb $2,0($16) 122 123 .set macro 124 .set reorder 125 $LFE3: 126 .end getStype 127 .align 2 128 .globl eatLine 129 .ent eatLine 130 .type eatLine, @function 131 eatLine: 132 $LFB4: 78:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
79:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** void eatLine()
80:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
133 .loc 1 80 0 134 .frame $sp,32,$31 # vars= 8, regs= 2/0, args= 16, gp= 0 135 .mask 0x80010000,-4 136 .fmask 0x00000000,0 137 .set noreorder 138 .set nomacro 139 140 00ac E0FFBD27 addiu $sp,$sp,-32 141 $LCFI6: 142 00b0 1800B0AF sw $16,24($sp) 143 $LCFI7: 144 00b4 1C00BFAF sw $31,28($sp)GAS LISTING /tmp/ccHaeCoR.s page 5 145 $LCFI8: 146 00b8 0A001024 li $16,10 # 0xa 81:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** char ch;
82:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** while(srecRead(&ch, 1) && ch != 0x0A);
147 .loc 1 82 0 148 00bc 1000A427 addiu $4,$sp,16 149 $L10: 150 00c0 0000000C jal srecRead 151 00c4 01000524 li $5,1 # 0x1 152 153 00c8 03004010 beq $2,$0,$L9 154 00cc 1000A283 lb $2,16($sp) 155 156 00d0 FBFF5014 bne $2,$16,$L10 157 00d4 1000A427 addiu $4,$sp,16 158 159 $L9: 160 00d8 1C00BF8F lw $31,28($sp) 161 00dc 1800B08F lw $16,24($sp) 162 00e0 0800E003 j $31 163 00e4 2000BD27 addiu $sp,$sp,32 164 165 .set macro 166 .set reorder 167 $LFE4: 168 .end eatLine 169 .local ch.0 170 .comm ch.0,2,4 171 .align 2 172 .globl getSpair 173 .ent getSpair 174 .type getSpair, @function 175 getSpair: 176 $LFB5: 83:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
84:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
85:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** /********************************************************************/
86:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** int getSpair (char* value)
87:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
177 .loc 1 87 0 178 .frame $sp,32,$31 # vars= 0, regs= 3/0, args= 16, gp= 0 179 .mask 0x80030000,-8 180 .fmask 0x00000000,0 181 .set noreorder 182 .set nomacro 183 184 00e8 E0FFBD27 addiu $sp,$sp,-32 185 $LCFI9: 186 00ec 1000B0AF sw $16,16($sp) 187 $LCFI10: 88:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** static char ch[2];
89:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
90:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** if(srecRead(&ch, 2))
188 .loc 1 90 0 189 00f0 0000103C lui $16,%hi(ch.0) 190 .loc 1 87 0 191 00f4 1400B1AF sw $17,20($sp)GAS LISTING /tmp/ccHaeCoR.s page 6 192 $LCFI11: 193 .loc 1 90 0 194 00f8 02000524 li $5,2 # 0x2 195 .loc 1 87 0 196 00fc 21888000 move $17,$4 197 0100 1800BFAF sw $31,24($sp) 198 $LCFI12: 199 .loc 1 90 0 200 0104 0000000C jal srecRead 201 0108 00000426 addiu $4,$16,%lo(ch.0) 202 91:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** {
92:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** *value = ((charToInt(ch[0]) << 4) | charToInt(ch[1]));
93:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** return 1;
94:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** }
95:/mnt/hgfs/boot/booter/source/applications/booter/srec.c ****
96:/mnt/hgfs/boot/booter/source/applications/booter/srec.c **** return 0;
203 .loc 1 96 0 204 .loc 1 90 0 205 010c 07004014 bne $2,$0,$L13
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -