📄 main.cod
字号:
0001c 3a000002 bcc |$L44011|
00020 e353007a cmp r3, #0x7A
00024 9243e020 subls lr, r3, #0x20
00028 9a000000 bls |$L44010|
0002c |$L44011|
0002c e1a0e003 mov lr, r3
00030 |$L44010|
00030 e3520061 cmp r2, #0x61
00034 3a000002 bcc |$L44017|
00038 e352007a cmp r2, #0x7A
0003c 92423020 subls r3, r2, #0x20
00040 9a000000 bls |$L44016|
00044 |$L44017|
00044 e1a03002 mov r3, r2
00048 |$L44016|
00048 e15e0003 cmp lr, r3
0004c 1a00000a bne |$L42525|
00050 e5f03001 ldrb r3, [r0, #1]!
; 417 : {
; 418 : return(-1);
; 419 : }
; 420 :
; 421 : ++pu8String1;
; 422 : ++pu8String2;
00054 e2811001 add r1, r1, #1
00058 |$L44032|
00058 e3530000 cmp r3, #0
0005c 1affffea bne |$L42521|
00060 |$L42522|
; 423 : }
; 424 :
; 425 : if (*pu8String1 || *pu8String2)
00060 e5d03000 ldrb r3, [r0]
00064 e3530000 cmp r3, #0
00068 05d13000 ldreqb r3, [r1]
0006c 03530000 cmpeq r3, #0
; 428 : }
; 429 : return(0);
00070 03a00000 moveq r0, #0
; 430 : }
00074 049de004 ldreq lr, [sp], #4
00078 012fff1e bxeq lr
0007c |$L42525|
; 426 : {
; 427 : return(-1);
0007c e3e00000 mvn r0, #0
; 430 : }
00080 e49de004 ldr lr, [sp], #4
00084 e12fff1e bx lr
00088 |$M44034|
ENDP ; |stricmp|
00000 AREA |.text| { |EatWhitespace| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$EatWhitespace|, PDATA, SELECTION=5, ASSOC=|.text| { |EatWhitespace| } ; comdat associative
|$T44057| DCD |$L44056|
DCD 0x40000b00
; Function compile flags: /Ogsy
00000 AREA |.text| { |EatWhitespace| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |EatWhitespace| PROC
; 433 : {
00000 |$L44056|
00000 |$M44054|
00000 |$L42531|
; 434 : while (IsSpace(*pu8Buffer) && *pu8Buffer != '\0')
00000 e5d03000 ldrb r3, [r0]
00004 e3530020 cmp r3, #0x20
00008 0a000003 beq |$L44044|
0000c e3530009 cmp r3, #9
00010 0a000001 beq |$L44044|
00014 e3530000 cmp r3, #0
00018 1a000002 bne |$L44049|
0001c |$L44044|
0001c e3530000 cmp r3, #0
; 435 : {
; 436 : ++pu8Buffer;
00020 12800001 addne r0, r0, #1
00024 1afffff5 bne |$L42531|
00028 |$L44049|
; 437 : }
; 438 :
; 439 : return(pu8Buffer);
; 440 : }
00028 e12fff1e bx lr
0002c |$M44055|
ENDP ; |EatWhitespace|
00000 AREA |.text| { |LexBegin| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$LexBegin|, PDATA, SELECTION=5, ASSOC=|.text| { |LexBegin| } ; comdat associative
|$T44088| DCD |$L44087|
DCD 0x40000e00
; Function compile flags: /Ogsy
00000 AREA |.text| { |LexBegin| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |LexBegin| PROC
; 443 : {
00000 |$L44087|
00000 |$M44085|
; 444 : sg_pu8LexPos = EatWhitespace(pu8InputBuffer);
00000 |$L44077|
00000 e5d03000 ldrb r3, [r0]
00004 e3530020 cmp r3, #0x20
00008 0a000003 beq |$L44074|
0000c e3530009 cmp r3, #9
00010 0a000001 beq |$L44074|
00014 e3530000 cmp r3, #0
00018 1a000002 bne |$L44081|
0001c |$L44074|
0001c e3530000 cmp r3, #0
00020 12800001 addne r0, r0, #1
00024 1afffff5 bne |$L44077|
00028 |$L44081|
00028 e59f3004 ldr r3, [pc, #4]
0002c e5830000 str r0, [r3]
; 445 : }
00030 e12fff1e bx lr
00034 |$L44090|
00034 00000000 DCD |sg_pu8LexPos|
00038 |$M44086|
ENDP ; |LexBegin|
IMPORT |OEMWriteDebugByte|
00000 AREA |.text| { |PrintHexDigit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PrintHexDigit|, PDATA, SELECTION=5, ASSOC=|.text| { |PrintHexDigit| } ; comdat associative
|$T44097| DCD |$L44096|
DCD 0x40000901
; Function compile flags: /Ogsy
00000 AREA |.text| { |PrintHexDigit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PrintHexDigit| PROC
; 448 : {
00000 |$L44096|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M44094|
; 449 : if (u8Digit > 9)
00004 e3500009 cmp r0, #9
; 450 : {
; 451 : u8Digit += 7;
00008 82803007 addhi r3, r0, #7
0000c 820300ff andhi r0, r3, #0xFF
; 452 : }
; 453 :
; 454 : u8Digit += '0';
00010 e2803030 add r3, r0, #0x30
; 455 : OEMWriteDebugByte(u8Digit);
00014 e20300ff and r0, r3, #0xFF
00018 eb000000 bl OEMWriteDebugByte
; 456 : }
0001c e49de004 ldr lr, [sp], #4
00020 e12fff1e bx lr
00024 |$M44095|
ENDP ; |PrintHexDigit|
00000 AREA |.text| { |PrintHexPair| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PrintHexPair|, PDATA, SELECTION=5, ASSOC=|.text| { |PrintHexPair| } ; comdat associative
|$T44117| DCD |$L44116|
DCD 0x40001101
; Function compile flags: /Ogsy
00000 AREA |.text| { |PrintHexPair| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PrintHexPair| PROC
; 459 : {
00000 |$L44116|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M44114|
00004 e1a04000 mov r4, r0
; 460 : PrintHexDigit(u8Hex >> 4);
00008 e1a03224 mov r3, r4, lsr #4
0000c e20330ff and r3, r3, #0xFF
00010 e3530009 cmp r3, #9
00014 82833007 addhi r3, r3, #7
00018 820330ff andhi r3, r3, #0xFF
0001c e2833030 add r3, r3, #0x30
00020 e20300ff and r0, r3, #0xFF
00024 eb000000 bl OEMWriteDebugByte
; 461 : PrintHexDigit(u8Hex & 0xf);
00028 e204300f and r3, r4, #0xF
0002c e3530009 cmp r3, #9
00030 82833007 addhi r3, r3, #7
00034 e2830030 add r0, r3, #0x30
00038 eb000000 bl OEMWriteDebugByte
; 462 : }
0003c e8bd4010 ldmia sp!, {r4, lr}
00040 e12fff1e bx lr
00044 |$M44115|
ENDP ; |PrintHexPair|
00000 AREA |.text| { |PrintHexValue| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PrintHexValue|, PDATA, SELECTION=5, ASSOC=|.text| { |PrintHexValue| } ; comdat associative
|$T44126| DCD |$L44125|
DCD 0x40001b01
; Function compile flags: /Ogsy
00000 AREA |.text| { |PrintHexValue| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PrintHexValue| PROC
; 466 : {
00000 |$L44125|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M44123|
00004 e1a05001 mov r5, r1
00008 e1a04000 mov r4, r0
; 467 : if (8 == u8Value)
0000c e3550008 cmp r5, #8
; 468 : {
; 469 : PrintHexPair(u32Value);
00010 020400ff andeq r0, r4, #0xFF
00014 0b000000 bleq PrintHexPair
; 470 : }
; 471 :
; 472 : if (16 == u8Value)
00018 e3550010 cmp r5, #0x10
0001c 1a000004 bne |$L42553|
; 473 : {
; 474 : PrintHexPair(u32Value >> 8);
00020 e1a03424 mov r3, r4, lsr #8
00024 e20300ff and r0, r3, #0xFF
00028 eb000000 bl PrintHexPair
; 475 : PrintHexPair(u32Value & 0xff);
0002c e20400ff and r0, r4, #0xFF
00030 eb000000 bl PrintHexPair
00034 |$L42553|
; 476 : }
; 477 :
; 478 : if (32 == u8Value)
00034 e3550020 cmp r5, #0x20
00038 1a000009 bne |$L42554|
; 479 : {
; 480 : PrintHexPair(u32Value >> 24);
0003c e1a00c24 mov r0, r4, lsr #24
00040 eb000000 bl PrintHexPair
; 481 : PrintHexPair(u32Value >> 16);
00044 e1a03824 mov r3, r4, lsr #16
00048 e20300ff and r0, r3, #0xFF
0004c eb000000 bl PrintHexPair
; 482 : PrintHexPair(u32Value >> 8);
00050 e1a03424 mov r3, r4, lsr #8
00054 e20300ff and r0, r3, #0xFF
00058 eb000000 bl PrintHexPair
; 483 : PrintHexPair(u32Value & 0xff);
0005c e20400ff and r0, r4, #0xFF
00060 eb000000 bl PrintHexPair
00064 |$L42554|
; 484 : }
; 485 : }
00064 e8bd4030 ldmia sp!, {r4, r5, lr}
00068 e12fff1e bx lr
0006c |$M44124|
ENDP ; |PrintHexValue|
IMPORT |atol|
00008 AREA |.bss|, NOINIT
|sg_u8YYLEX| % 0x83
00000 AREA |.text| { |LexGetNextToken| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$LexGetNextToken|, PDATA, SELECTION=5, ASSOC=|.text| { |LexGetNextToken| } ; comdat associative
|$T44328| DCD |$L44327|
DCD 0x4000c301
; Function compile flags: /Ogsy
00000 AREA |.text| { |LexGetNextToken| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |LexGetNextToken| PROC
; 488 : {
00000 |$L44327|
00000 e92d41f0 stmdb sp!, {r4 - r8, lr}
00004 |$M44325|
; 489 : ELex eToken = LEX_EOF;
; 490 : UINT32 u32TokenLength = 0;
; 491 :
; 492 : // Eat any leading spaces
; 493 :
; 494 : sg_pu8LexPos = EatWhitespace(sg_pu8LexPos);
00004 e59f42fc ldr r4, [pc, #0x2FC]
00008 e5942ac8 ldr r2, [r4, #0xAC8]
0000c |$L44146|
0000c e5d23000 ldrb r3, [r2]
00010 e3530020 cmp r3, #0x20
00014 0a000003 beq |$L44143|
00018 e3530009 cmp r3, #9
0001c 0a000001 beq |$L44143|
00020 e3530000 cmp r3, #0
00024 1a000002 bne |$L44269|
00028 |$L44143|
00028 e3530000 cmp r3, #0
0002c 12822001 addne r2, r2, #1
00030 1afffff5 bne |$L44146|
00034 |$L44269|
; 495 :
; 496 : // If this is the end of the string, let everyone know
; 497 :
; 498 : if ('\0' == *sg_pu8LexPos)
00034 e5d21000 ldrb r1, [r2]
00038 e5842ac8 str r2, [r4, #0xAC8]
0003c e3510000 cmp r1, #0
; 499 : {
; 500 : return(LEX_EOF);
00040 03a00c01 moveq r0, #1, 24
; 618 :
; 619 : return(eToken);
; 620 : }
00044 08bd41f0 ldmeqia sp!, {r4 - r8, lr}
00048 012fff1e bxeq lr
; 501 : }
; 502 :
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -