|
Disassembly里面的代码是这样的
发现p传递的居然是02003590(0x0000 - 0x0003里面的内容)为什么呢?
===================================================================
C:0x0000 020035 LJMP C:0035
4: void test(unsigned long p)
C:0x0003 900000 MOV DPTR,#0x0000
C:0x0006 120041 LCALL C?LSTXDATA(C:0041)
5: {
6: p++;
7:
8: }
9:
C:0x0009 900000 MOV DPTR,#0x0000
C:0x000C E0 MOVX A,@DPTR
C:0x000D FC MOV R4,A
C:0x000E A3 INC DPTR
C:0x000F E0 MOVX A,@DPTR
C:0x0010 FD MOV R5,A
C:0x0011 A3 INC DPTR
C:0x0012 E0 MOVX A,@DPTR
C:0x0013 FE MOV R6,A
C:0x0014 A3 INC DPTR
C:0x0015 E0 MOVX A,@DPTR
C:0x0016 2401 ADD A,#0x01
C:0x0018 FF MOV R7,A
C:0x0019 E4 CLR A
C:0x001A 3E ADDC A,R6
C:0x001B FE MOV R6,A
C:0x001C E4 CLR A
C:0x001D 3D ADDC A,R5
C:0x001E FD MOV R5,A
C:0x001F E4 CLR A
C:0x0020 3C ADDC A,R4
C:0x0021 FC MOV R4,A
C:0x0022 900000 MOV DPTR,#0x0000
C:0x0025 020041 LJMP C?LSTXDATA(C:0041)
10: void main(void)
11: {
12: test(0x1FFFFFFF);
C:0x0028 7FFF MOV R7,#0xFF
C:0x002A 7EFF MOV R6,#0xFF
C:0x002C 7DFF MOV R5,#0xFF
C:0x002E 7C1F MOV R4,#0x1F
C:0x0030 120003 LCALL test(C:0003)
13: while(1);
C:0x0033 80FE SJMP C:0033
C:0x0035 787F MOV R0,#0x7F
C:0x0037 E4 CLR A
C:0x0038 F6 MOV @R0,A
C:0x0039 D8FD DJNZ R0,C:0038
C:0x003B 758107 MOV SP(0x81),#0x07
C:0x003E 020028 LJMP main(C:0028)
C?LSTXDATA:
C:0x0041 EC MOV A,R4
C:0x0042 F0 MOVX @DPTR,A
C:0x0043 A3 INC DPTR
C:0x0044 ED MOV A,R5
C:0x0045 F0 MOVX @DPTR,A
C:0x0046 A3 INC DPTR
C:0x0047 EE MOV A,R6
C:0x0048 F0 MOVX @DPTR,A
C:0x0049 A3 INC DPTR
C:0x004A EF MOV A,R7
C:0x004B F0 MOVX @DPTR,A
C:0x004C 22 RET
|
|