📄 format.cod
字号:
00018 e3510000 cmp r1, #0
0001c 0a000002 beq |$L36083|
00020 |$L36084|
; 418 : {
; 419 : pOutputNumHex(n >> 4, depth);
00020 e1a00224 mov r0, r4, lsr #4
00024 eb000000 bl pOutputNumHex
; 420 : n &= 0xf;
00028 e204400f and r4, r4, #0xF
0002c |$L36083|
; 421 : }
; 422 :
; 423 : if (n < 10)
0002c e354000a cmp r4, #0xA
; 424 : pOutputByte((unsigned char)(n + '0'));
00030 e2840030 add r0, r4, #0x30
; 425 : else
; 426 : pOutputByte((unsigned char)(n - 10 + 'A'));
00034 22840037 addcs r0, r4, #0x37
00038 e20000ff and r0, r0, #0xFF
0003c eb000000 bl pOutputByte
; 427 : }
00040 e8bd4010 ldmia sp!, {r4, lr}
00044 e12fff1e bx lr
00048 |$M36272|
ENDP ; |pOutputNumHex|
00000 AREA |.text| { |pOutputNumDecimal| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$pOutputNumDecimal|, PDATA, SELECTION=5, ASSOC=|.text| { |pOutputNumDecimal| } ; comdat associative
|$T36280| DCD |pOutputNumDecimal|
DCD 0x40001001
; Function compile flags: /Ogsy
00000 AREA |.text| { |pOutputNumDecimal| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |pOutputNumDecimal| PROC
; 439 : {
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M36278|
00004 e1a04000 mov r4, r0
; 440 : if (n >= 10)
00008 e354000a cmp r4, #0xA
; 441 : {
; 442 : pOutputNumDecimal(n / 10);
0000c 259f0028 ldrcs r0, [pc, #0x28]
00010 20810094 umullcs r0, r1, r4, r0
00014 21a021a1 movcs r2, r1, lsr #3
00018 20820102 addcs r0, r2, r2, lsl #2
0001c 20444080 subcs r4, r4, r0, lsl #1
00020 21a00002 movcs r0, r2
00024 2b000000 blcs pOutputNumDecimal
; 443 : n %= 10;
; 444 : }
; 445 :
; 446 : pOutputByte((unsigned char)(n + '0'));
00028 e2840030 add r0, r4, #0x30
0002c e20000ff and r0, r0, #0xFF
00030 eb000000 bl pOutputByte
; 447 : }
00034 e8bd4010 ldmia sp!, {r4, lr}
00038 e12fff1e bx lr
0003c |$L36282|
0003c cccccccd DCD 0xcccccccd
00040 |$M36279|
ENDP ; |pOutputNumDecimal|
00000 AREA |.text| { |OutputString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OutputString|, PDATA, SELECTION=5, ASSOC=|.text| { |OutputString| } ; comdat associative
|$T36290| DCD |OutputString|
DCD 0x40000f01
; Function compile flags: /Ogsy
00000 AREA |.text| { |OutputString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OutputString| PROC
; 460 : {
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M36288|
00004 e1a04000 mov r4, r0
; 461 : while (*s)
00008 e5d40000 ldrb r0, [r4]
0000c e3500000 cmp r0, #0
00010 0a000007 beq |$L36099|
00014 |$L36098|
; 462 : {
; 463 : if (*s == '\n')
00014 e350000a cmp r0, #0xA
; 464 : OEMWriteDebugByte('\r');
00018 03a0000d moveq r0, #0xD
0001c 0b000000 bleq OEMWriteDebugByte
; 465 :
; 466 : OEMWriteDebugByte(*s++);
00020 e4d40001 ldrb r0, [r4], #1
00024 eb000000 bl OEMWriteDebugByte
00028 e5d43000 ldrb r3, [r4]
0002c e1b00003 movs r0, r3
00030 1afffff7 bne |$L36098|
00034 |$L36099|
; 467 : }
; 468 : }
00034 e8bd4010 ldmia sp!, {r4, lr}
00038 e12fff1e bx lr
0003c |$M36289|
ENDP ; |OutputString|
EXPORT |inet_ntoa|
EXPORT |??_C@_0M@EGHG@?$CFu?4?$CFu?4?$CFu?4?$CFu?$AA@| [ DATA ] ; `string'
00004 AREA |.bss|, NOINIT
|?szDottedD@?1??inet_ntoa@@9@9| % 0x10 ; `inet_ntoa'::`2'::szDottedD
00000 AREA |.text| { |inet_ntoa| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$inet_ntoa|, PDATA, SELECTION=5, ASSOC=|.text| { |inet_ntoa| } ; comdat associative
|$T36298| DCD |inet_ntoa|
DCD 0x40001502
00000 AREA |.rdata| { |??_C@_0M@EGHG@?$CFu?4?$CFu?4?$CFu?4?$CFu?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0M@EGHG@?$CFu?4?$CFu?4?$CFu?4?$CFu?$AA@| DCB "%u.%u.%u.%u", 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |inet_ntoa| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |inet_ntoa| PROC
; 475 : {
00000 e92d4010 stmdb sp!, {r4, lr}
00004 e24dd008 sub sp, sp, #8
00008 |$M36296|
00008 e1a02000 mov r2, r0
; 476 : static char szDottedD[16];
; 477 :
; 478 : FormatString(szDottedD, "%u.%u.%u.%u",
; 479 : (BYTE)dwIP, (BYTE)(dwIP >> 8),
; 480 : (BYTE)(dwIP >> 16), (BYTE)(dwIP >> 24));
0000c e59f403c ldr r4, [pc, #0x3C]
00010 e1a00c22 mov r0, r2, lsr #24
00014 e1a01822 mov r1, r2, lsr #16
00018 e58d0004 str r0, [sp, #4]
0001c e20100ff and r0, r1, #0xFF
00020 e1a01422 mov r1, r2, lsr #8
00024 e58d0000 str r0, [sp]
00028 e20130ff and r3, r1, #0xFF
0002c e59f1018 ldr r1, [pc, #0x18]
00030 e20220ff and r2, r2, #0xFF
00034 e1a00004 mov r0, r4
00038 eb000000 bl FormatString
; 481 :
; 482 : return szDottedD;
0003c e1a00004 mov r0, r4
; 483 : }
00040 e28dd008 add sp, sp, #8
00044 e8bd4010 ldmia sp!, {r4, lr}
00048 e12fff1e bx lr
0004c |$L36300|
0004c 00000000 DCD |??_C@_0M@EGHG@?$CFu?4?$CFu?4?$CFu?4?$CFu?$AA@|
00050 00000000 DCD |?szDottedD@?1??inet_ntoa@@9@9|
00054 |$M36297|
ENDP ; |inet_ntoa|
EXPORT |AsciiToInt|
00000 AREA |.text| { |AsciiToInt| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$AsciiToInt|, PDATA, SELECTION=5, ASSOC=|.text| { |AsciiToInt| } ; comdat associative
|$T36314| DCD |AsciiToInt|
DCD 0x40001101
; Function compile flags: /Ogsy
00000 AREA |.text| { |AsciiToInt| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |AsciiToInt| PROC
; 486 : {
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M36312|
00004 e1a03000 mov r3, r0
; 487 : char c;
; 488 : int total = 0;
00008 e3a04000 mov r4, #0
; 489 :
; 490 : c = *szNumber++;
; 491 :
; 492 : while ((c >= '0') && (c <= '9'))
0000c ea000004 b |$L36311|
00010 |$L36119|
00010 e3520039 cmp r2, #0x39
00014 ca000007 bgt |$L36120|
; 493 : {
; 494 : total = 10 * total + (c - '0');
00018 e0840104 add r0, r4, r4, lsl #2
0001c e0821080 add r1, r2, r0, lsl #1
00020 e2414030 sub r4, r1, #0x30
00024 |$L36311|
; 495 : c = *szNumber++;
00024 e0d300d1 ldrsb r0, [r3], #1
00028 e1a01c00 mov r1, r0, lsl #24
0002c e1a02c41 mov r2, r1, asr #24
00030 e3520030 cmp r2, #0x30
00034 aafffff5 bge |$L36119|
00038 |$L36120|
; 496 : }
; 497 :
; 498 : return (total);
00038 e1a00004 mov r0, r4
; 499 : }
0003c e8bd4010 ldmia sp!, {r4, lr}
00040 e12fff1e bx lr
00044 |$M36313|
ENDP ; |AsciiToInt|
EXPORT |inet_addr|
00000 AREA |.text| { |inet_addr| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$inet_addr|, PDATA, SELECTION=5, ASSOC=|.text| { |inet_addr| } ; comdat associative
|$T36330| DCD |inet_addr|
DCD 0x40001a01
; Function compile flags: /Ogsy
00000 AREA |.text| { |inet_addr| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |inet_addr| PROC
; 506 : {
00000 e92d40f0 stmdb sp!, {r4 - r7, lr}
00004 |$M36328|
00004 e1a05000 mov r5, r0
; 507 : DWORD dwIP = 0;
00008 e3a07000 mov r7, #0
0000c e1a06007 mov r6, r7
; 508 : DWORD cBytes;
; 509 : char *pszLastNum;
; 510 : int atoi (const char *s);
; 511 :
; 512 : // Replace the dots with NULL terminators
; 513 : pszLastNum = pszDottedD;
00010 e1a01005 mov r1, r5
00014 e1a04007 mov r4, r7
00018 |$L36131|
; 514 :
; 515 : for( cBytes = 0; cBytes < 4; cBytes++ )
; 516 : {
; 517 : while(*pszDottedD != '.' && *pszDottedD != '\0')
00018 e5d50000 ldrb r0, [r5]
0001c ea000003 b |$L36327|
00020 |$L36135|
00020 e5d50000 ldrb r0, [r5]
00024 e31000ff tst r0, #0xFF
00028 0a000002 beq |$L36136|
0002c e5f50001 ldrb r0, [r5, #1]!
00030 |$L36327|
00030 e350002e cmp r0, #0x2E
00034 1afffff9 bne |$L36135|
00038 |$L36136|
; 518 : pszDottedD++;
; 519 :
; 520 : if (pszDottedD == '\0' && cBytes != 3)
; 521 : return 0;
; 522 :
; 523 : *pszDottedD = '\0';
; 524 : dwIP |= (AsciiToInt(pszLastNum) & 0xFF) << (8*cBytes);
00038 e1a00001 mov r0, r1
0003c e4c57001 strb r7, [r5], #1
00040 eb000000 bl AsciiToInt
00044 e20010ff and r1, r0, #0xFF
00048 e1866411 orr r6, r6, r1, lsl r4
0004c e2844008 add r4, r4, #8
; 525 : pszLastNum = ++pszDottedD;
00050 e1a01005 mov r1, r5
00054 e3540020 cmp r4, #0x20
00058 3affffee bcc |$L36131|
; 526 : }
; 527 :
; 528 : return dwIP;
0005c e1a00006 mov r0, r6
; 529 : }
00060 e8bd40f0 ldmia sp!, {r4 - r7, lr}
00064 e12fff1e bx lr
00068 |$M36329|
ENDP ; |inet_addr|
EXPORT |EdbgDumpHexBuf|
EXPORT |??_C@_0BJ@KDLF@Dump?5of?5?$CFu?5bytes?5?$EA?50x?$CFX?6?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_09OJOL@?60x?$CFX?5?5?5?5?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_01BJG@?6?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_03INIJ@?$CFB?5?$AA@| [ DATA ] ; `string'
00000 AREA |.text| { |EdbgDumpHexBuf| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$EdbgDumpHexBuf|, PDATA, SELECTION=5, ASSOC=|.text| { |EdbgDumpHexBuf| } ; comdat associative
|$T36344| DCD |EdbgDumpHexBuf|
DCD 0x40002601
00000 AREA |.rdata| { |??_C@_0BJ@KDLF@Dump?5of?5?$CFu?5bytes?5?$EA?50x?$CFX?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BJ@KDLF@Dump?5of?5?$CFu?5bytes?5?$EA?50x?$CFX?6?$AA@| DCB "Dump o"
DCB "f %u bytes @ 0x%X", 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_09OJOL@?60x?$CFX?5?5?5?5?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_09OJOL@?60x?$CFX?5?5?5?5?$AA@| DCB 0xa, "0x%X ", 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_01BJG@?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_01BJG@?6?$AA@| DCB 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_03INIJ@?$CFB?5?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_03INIJ@?$CFB?5?$AA@| DCB "%B ", 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |EdbgDumpHexBuf| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |EdbgDumpHexBuf| PROC
; 535 : {
00000 e92d41f0 stmdb sp!, {r4 - r8, lr}
00004 |$M36342|
00004 e1a05000 mov r5, r0
00008 e1a07001 mov r7, r1
; 536 : DWORD i,j;
; 537 :
; 538 : EdbgOutputDebugString("Dump of %u bytes @ 0x%X\n", Count, (DWORD)pBuf);
0000c e59f0080 ldr r0, [pc, #0x80]
00010 e1a02005 mov r2, r5
00014 eb000000 bl EdbgOutputDebugString
; 539 :
; 540 : for (i = 0; i < Count; i += ENTRIES_PER_LINE)
00018 e3a08000 mov r8, #0
0001c e1a06008 mov r6, r8
00020 e3570000 cmp r7, #0
00024 9a000013 bls |$L36150|
00028 |$L36148|
; 541 : {
; 542 : EdbgOutputDebugString("\n0x%X ",i);
00028 e59f0060 ldr r0, [pc, #0x60]
0002c e1a01006 mov r1, r6
00030 eb000000 bl EdbgOutputDebugString
; 543 :
; 544 : for (j = 0; j < ENTRIES_PER_LINE; j++)
00034 e1a04008 mov r4, r8
00038 |$L36152|
; 545 : if ((i+j) >= Count)
00038 e0840006 add r0, r4, r6
0003c e1500007 cmp r0, r7
00040 3a000002 bcc |$L36155|
; 546 : EdbgOutputDebugString("\n");
00044 e59f003c ldr r0, [pc, #0x3C]
00048 eb000000 bl EdbgOutputDebugString
; 547 : else
0004c ea000003 b |$L36153|
00050 |$L36155|
; 548 : EdbgOutputDebugString("%B ", pBuf[i+j]);
00050 e0840006 add r0, r4, r6
00054 e7d01005 ldrb r1, [r0, +r5]
00058 e59f002c ldr r0, [pc, #0x2C]
0005c eb000000 bl EdbgOutputDebugString
00060 |$L36153|
00060 e2844001 add r4, r4, #1
00064 e3540010 cmp r4, #0x10
00068 3afffff2 bcc |$L36152|
0006c e2866010 add r6, r6, #0x10
00070 e1560007 cmp r6, r7
00074 3affffeb bcc |$L36148|
00078 |$L36150|
; 549 : }
; 550 :
; 551 : EdbgOutputDebugString("\n");
00078 e59f0008 ldr r0, [pc, #8]
0007c eb000000 bl EdbgOutputDebugString
; 552 : }
00080 e8bd41f0 ldmia sp!, {r4 - r8, lr}
00084 e12fff1e bx lr
00088 |$L36346|
00088 00000000 DCD |??_C@_01BJG@?6?$AA@|
0008c 00000000 DCD |??_C@_03INIJ@?$CFB?5?$AA@|
00090 00000000 DCD |??_C@_09OJOL@?60x?$CFX?5?5?5?5?$AA@|
00094 00000000 DCD |??_C@_0BJ@KDLF@Dump?5of?5?$CFu?5bytes?5?$EA?50x?$CFX?6?$AA@|
00098 |$M36343|
ENDP ; |EdbgDumpHexBuf|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -