不过奇怪的是如果把结构体定义在SRAM中运行就是正确的!
main.c:67 tmp[tmp3]=tmp[tmp2];
0x906b <main+43> 0x7B02 LD A,(0x02,SP) LD A,(0x02,SP)
0x906d <main+45> 0x97 LD XL,A LD XL,A
0x906e <main+46> 0xA60B LD A,#0x0b LD A,#0x0b
0x9070 <main+48> 0x42 MUL X,A MUL X,A
0x9071 <main+49> 0x01 RRWA X,A RRWA X,A
0x9072 <main+50> 0xAB2B ADD A,#0x2b ADD A,#0x2b
0x9074 <main+52> 0x2401 JRNC 0x9077 JRNC 0x9077
0x9076 <main+54> 0x5C INCW X INCW X
0x9077 <main+55> 0x5F CLRW X CLRW X
0x9078 <main+56> 0x97 LD XL,A LD XL,A
0x9079 <main+57> 0x89 PUSHW X PUSHW X
0x907a <main+58> 0x7B05 LD A,(0x05,SP) LD A,(0x05,SP)
0x907c <main+60> 0x97 LD XL,A LD XL,A
0x907d <main+61> 0xA60B LD A,#0x0b LD A,#0x0b
0x907f <main+63> 0x42 MUL X,A MUL X,A
0x9080 <main+64> 0x01 RRWA X,A RRWA X,A
0x9081 <main+65> 0xAB2B ADD A,#0x2b ADD A,#0x2b
0x9083 <main+67> 0x2401 JRNC 0x9086 JRNC 0x9086
0x9085 <main+69> 0x5C INCW X INCW X
0x9086 <main+70> 0x5F CLRW X CLRW X
0x9087 <main+71> 0x97 LD XL,A LD XL,A
0x9088 <main+72> 0x9085 POPW Y POPW Y
0x908a <main+74> 0xA60B LD A,#0x0b LD A,#0x0b
0x908c <main+76> 0xCD92DC CALL 0x92dc CALL c_yxmov //注意看这里,调用不同,跟下面不一样。这里是YX.
main.c:68 tmp[2]=tmp[0];
0x908f <main+79> 0xAE0041 LDW X,#0x0041 LDW X,#0x0041
0x9092 <main+82> 0x90AE002B LDW Y,#0x002b LDW Y,#0x002b
0x9096 <main+86> 0xA60B LD A,#0x0b LD A,#0x0b
0x9098 <main+88> 0xCD92CD CALL 0x92cd CALL c_xymov //注意看这里,调用不同,跟上面不一样。这里是XY. |