ASM оптимизированного [+][->] (а хотя нафига он нужен ?) http://upload.caxapa.ru/gm_optimizated.asm
@00000000: _..X_EXT_NV_SIZE +00000000: 940C0112 JMP 0x00000112 Jump +00000002: 9518 RETI Interrupt return +00000003: 9518 RETI Interrupt return +00000004: 9518 RETI Interrupt return +00000005: 9518 RETI Interrupt return +00000006: 9518 RETI Interrupt return +00000007: 9518 RETI Interrupt return @00000008: _..X_HEAP_SIZE +00000008: 9518 RETI Interrupt return +00000009: 9518 RETI Interrupt return +0000000A: 9518 RETI Interrupt return +0000000B: 9518 RETI Interrupt return +0000000C: 9518 RETI Interrupt return +0000000D: 9518 RETI Interrupt return +0000000E: 9518 RETI Interrupt return +0000000F: 9518 RETI Interrupt return @00000010: _..X_RSTACK_SIZE +00000010: 9518 RETI Interrupt return +00000011: 9518 RETI Interrupt return +00000012: 9518 RETI Interrupt return +00000013: 9518 RETI Interrupt return +00000014: 9518 RETI Interrupt return +00000015: 9518 RETI Interrupt return +00000016: 9518 RETI Interrupt return +00000017: 9518 RETI Interrupt return +00000018: 9518 RETI Interrupt return +00000019: 9518 RETI Interrupt return +0000001A: 9518 RETI Interrupt return +0000001B: 9518 RETI Interrupt return +0000001C: 9518 RETI Interrupt return +0000001D: 9518 RETI Interrupt return +0000001E: 9518 RETI Interrupt return +0000001F: 9518 RETI Interrupt return @00000020: _..X_CSTACK_SIZE +00000020: 9518 RETI Interrupt return +00000021: 9518 RETI Interrupt return +00000022: 9518 RETI Interrupt return +00000023: 9518 RETI Interrupt return +00000024: 9518 RETI Interrupt return +00000025: 9518 RETI Interrupt return +00000026: 9518 RETI Interrupt return +00000027: 9518 RETI Interrupt return +00000028: 9518 RETI Interrupt return +00000029: 9518 RETI Interrupt return +0000002A: 9518 RETI Interrupt return +0000002B: 9518 RETI Interrupt return +0000002C: 9518 RETI Interrupt return +0000002D: 9518 RETI Interrupt return +0000002E: 9518 RETI Interrupt return +0000002F: 9518 RETI Interrupt return +00000030: 9518 RETI Interrupt return +00000031: 9518 RETI Interrupt return +00000032: 9518 RETI Interrupt return +00000033: 9518 RETI Interrupt return +00000034: 9518 RETI Interrupt return +00000035: 9518 RETI Interrupt return +00000036: 9518 RETI Interrupt return +00000037: 9518 RETI Interrupt return +00000038: 9518 RETI Interrupt return +00000039: 9518 RETI Interrupt return +0000003A: 9518 RETI Interrupt return +0000003B: 9518 RETI Interrupt return +0000003C: 9518 RETI Interrupt return +0000003D: 9518 RETI Interrupt return +0000003E: 9518 RETI Interrupt return +0000003F: 9518 RETI Interrupt return +00000040: 9518 RETI Interrupt return +00000041: 9518 RETI Interrupt return +00000042: 9518 RETI Interrupt return +00000043: 9518 RETI Interrupt return +00000044: 9518 RETI Interrupt return +00000045: 9518 RETI Interrupt return @00000046: _..X_FLASH_BASE +00000046: 925A ST -Y,R5 Store indirect and predecrement +00000047: 924A ST -Y,R4 Store indirect and predecrement +00000048: 93BA ST -Y,R27 Store indirect and predecrement +00000049: 93AA ST -Y,R26 Store indirect and predecrement +0000004A: 939A ST -Y,R25 Store indirect and predecrement +0000004B: 938A ST -Y,R24 Store indirect and predecrement +0000004C: 97EF SBIW R28,0x3F Subtract immediate from word +0000004D: 97EF SBIW R28,0x3F Subtract immediate from word +0000004E: 97EF SBIW R28,0x3F Subtract immediate from word +0000004F: 976B SBIW R28,0x1B Subtract immediate from word +00000050: E505 LDI R16,0x55 Load immediate +00000051: BB0B OUT 0x1B,R16 Out to I/O location +00000052: 01BE MOVW R22,R28 Copy register pair +00000053: 5760 SUBI R22,0x70 Subtract immediate +00000054: 4F7F SBCI R23,0xFF Subtract immediate with carry +00000055: E5EC LDI R30,0x5C Load immediate +00000056: E0F2 LDI R31,0x02 Load immediate +00000057: E030 LDI R19,0x00 Load immediate +00000058: 018B MOVW R16,R22 Copy register pair +00000059: E448 LDI R20,0x48 Load immediate +0000005A: E050 LDI R21,0x00 Load immediate +0000005B: 940E0120 CALL 0x00000120 Call subroutine +0000005D: E030 LDI R19,0x00 Load immediate +0000005E: 01DE MOVW R26,R28 Copy register pair +0000005F: 01CE MOVW R24,R28 Copy register pair +00000060: 9648 ADIW R24,0x18 Add immediate to word +00000061: 2F23 MOV R18,R19 Copy register +00000062: 2F13 MOV R17,R19 Copy register +00000063: 9513 INC R17 Increment +00000064: 2F01 MOV R16,R17 Copy register +00000065: 914C LD R20,X Load indirect +00000066: 3118 CPI R17,0x18 Compare with immediate +00000067: F450 BRCC PC+0x0B Branch if carry cleared +00000068: 01FE MOVW R30,R28 Copy register pair +00000069: 0FE1 ADD R30,R17 Add without carry +0000006A: 1FF5 ADC R31,R21 Add with carry +0000006B: 9111 LD R17,Z+ Load indirect and postincrement +0000006C: 1714 CP R17,R20 Compare +0000006D: F408 BRCC PC+0x02 Branch if carry cleared +0000006E: 2F20 MOV R18,R16 Copy register +0000006F: 9503 INC R16 Increment +00000070: 3108 CPI R16,0x18 Compare with immediate +00000071: F3C8 BRCS PC-0x06 Branch if carry set +00000072: 1723 CP R18,R19 Compare +00000073: F0A9 BREQ PC+0x16 Branch if equal +00000074: 2F24 MOV R18,R20 Copy register +00000075: 2F40 MOV R20,R16 Copy register +00000076: 01FE MOVW R30,R28 Copy register pair +00000077: 0FE0 ADD R30,R16 Add without carry +00000078: 1FF5 ADC R31,R21 Add with carry +00000079: 8100 LDD R16,Z+0 Load indirect with displacement +0000007A: 930C ST X,R16 Store indirect +0000007B: 8320 STD Z+0,R18 Store indirect with displacement +0000007C: 01FC MOVW R30,R24 Copy register pair +0000007D: 8120 LDD R18,Z+0 Load indirect with displacement +0000007E: 018E MOVW R16,R28 Copy register pair +0000007F: 5E08 SUBI R16,0xE8 Subtract immediate @00000080: _..X_RSTACK_BASE +00000080: 4F1F SBCI R17,0xFF Subtract immediate with carry +00000081: 0F04 ADD R16,R20 Add without carry +00000082: 1F15 ADC R17,R21 Add with carry +00000083: 01F8 MOVW R30,R16 Copy register pair +00000084: 8140 LDD R20,Z+0 Load indirect with displacement +00000085: 01FC MOVW R30,R24 Copy register pair +00000086: 8340 STD Z+0,R20 Store indirect with displacement +00000087: 01F8 MOVW R30,R16 Copy register pair +00000088: 8320 STD Z+0,R18 Store indirect with displacement +00000089: 9533 INC R19 Increment +0000008A: 9601 ADIW R24,0x01 Add immediate to word +0000008B: 9611 ADIW R26,0x01 Add immediate to word +0000008C: 3138 CPI R19,0x18 Compare with immediate +0000008D: F298 BRCS PC-0x2C Branch if carry set +0000008E: 8108 LDD R16,Y+0 Load indirect with displacement +0000008F: AB08 STD Y+48,R16 Store indirect with displacement +00000090: 01FE MOVW R30,R28 Copy register pair +00000091: 57E0 SUBI R30,0x70 Subtract immediate +00000092: 4FFF SBCI R31,0xFF Subtract immediate with carry +00000093: 8D08 LDD R16,Y+24 Load indirect with displacement +00000094: 0FE0 ADD R30,R16 Add without carry +00000095: 1FF5 ADC R31,R21 Add with carry +00000096: 8D00 LDD R16,Z+24 Load indirect with displacement +00000097: 01DE MOVW R26,R28 Copy register pair +00000098: 5BA8 SUBI R26,0xB8 Subtract immediate +00000099: 4FBF SBCI R27,0xFF Subtract immediate with carry +0000009A: 930C ST X,R16 Store indirect +0000009B: A900 LDD R16,Z+48 Load indirect with displacement +0000009C: 9678 ADIW R30,0x18 Add immediate to word +0000009D: 01DE MOVW R26,R28 Copy register pair +0000009E: 5AA0 SUBI R26,0xA0 Subtract immediate +0000009F: 4FBF SBCI R27,0xFF Subtract immediate with carry +000000A0: 930C ST X,R16 Store indirect +000000A1: A900 LDD R16,Z+48 Load indirect with displacement +000000A2: 01FE MOVW R30,R28 Copy register pair +000000A3: 96FF ADIW R30,0x3F Add immediate to word +000000A4: AF01 STD Z+57,R16 Store indirect with displacement +000000A5: E020 LDI R18,0x00 Load immediate +000000A6: 01CE MOVW R24,R28 Copy register pair +000000A7: 01DE MOVW R26,R28 Copy register pair +000000A8: 9658 ADIW R26,0x18 Add immediate to word +000000A9: E138 LDI R19,0x18 Load immediate +000000AA: 01FC MOVW R30,R24 Copy register pair +000000AB: 8020 LDD R2,Z+0 Load indirect with displacement +000000AC: 2E42 MOV R4,R18 Copy register +000000AD: 2455 CLR R5 Clear Register +000000AE: 01FE MOVW R30,R28 Copy register pair +000000AF: 96F0 ADIW R30,0x30 Add immediate to word +000000B0: 0FE2 ADD R30,R18 Add without carry +000000B1: 1DF5 ADC R31,R5 Add with carry +000000B2: 8220 STD Z+0,R2 Store indirect with displacement +000000B3: 01AE MOVW R20,R28 Copy register pair +000000B4: 5740 SUBI R20,0x70 Subtract immediate +000000B5: 4F5F SBCI R21,0xFF Subtract immediate with carry +000000B6: 910D LD R16,X+ Load indirect and postincrement +000000B7: 0F40 ADD R20,R16 Add without carry +000000B8: 1D55 ADC R21,R5 Add with carry +000000B9: 5E48 SUBI R20,0xE8 Subtract immediate +000000BA: 4F5F SBCI R21,0xFF Subtract immediate with carry +000000BB: 01BE MOVW R22,R28 Copy register pair +000000BC: 5D60 SUBI R22,0xD0 Subtract immediate +000000BD: 4F7F SBCI R23,0xFF Subtract immediate with carry +000000BE: 0F62 ADD R22,R18 Add without carry +000000BF: 1D75 ADC R23,R5 Add with carry +000000C0: 018B MOVW R16,R22 Copy register pair +000000C1: 5B08 SUBI R16,0xB8 Subtract immediate +000000C2: 4F1F SBCI R17,0xFF Subtract immediate with carry +000000C3: 2022 TST R2 Test for Zero or Minus +000000C4: F099 BREQ PC+0x14 Branch if equal +000000C5: 01FA MOVW R30,R20 Copy register pair +000000C6: 8000 LDD R0,Z+0 Load indirect with displacement +000000C7: 01FB MOVW R30,R22 Copy register pair +000000C8: 8C10 LDD R1,Z+24 Load indirect with displacement +000000C9: 2810 OR R1,R0 Logical OR +000000CA: 8E10 STD Z+24,R1 Store indirect with displacement +000000CB: 01FA MOVW R30,R20 Copy register pair +000000CC: 8C00 LDD R0,Z+24 Load indirect with displacement +000000CD: 01FB MOVW R30,R22 Copy register pair +000000CE: A960 LDD R22,Z+48 Load indirect with displacement +000000CF: 2960 OR R22,R0 Logical OR +000000D0: AB60 STD Z+48,R22 Store indirect with displacement +000000D1: 01FA MOVW R30,R20 Copy register pair +000000D2: A940 LDD R20,Z+48 Load indirect with displacement +000000D3: 01F8 MOVW R30,R16 Copy register pair +000000D4: 8100 LDD R16,Z+0 Load indirect with displacement +000000D5: 2B04 OR R16,R20 Logical OR +000000D6: 8300 STD Z+0,R16 Store indirect with displacement +000000D7: C026 RJMP PC+0x0027 Relative jump +000000D8: 5F6F SUBI R22,0xFF Subtract immediate +000000D9: 4F7F SBCI R23,0xFF Subtract immediate with carry +000000DA: 010B MOVW R0,R22 Copy register pair +000000DB: 01FB MOVW R30,R22 Copy register pair +000000DC: 8220 STD Z+0,R2 Store indirect with displacement +000000DD: 011E MOVW R2,R28 Copy register pair +000000DE: E360 LDI R22,0x30 Load immediate +000000DF: 0E26 ADD R2,R22 Add without carry +000000E0: 1C35 ADC R3,R5 Add with carry +000000E1: E061 LDI R22,0x01 Load immediate +000000E2: 0E46 ADD R4,R22 Add without carry +000000E3: 1C55 ROL R5 Rotate Left Through Carry +000000E4: 01B1 MOVW R22,R2 Copy register pair +000000E5: 0D64 ADD R22,R4 Add without carry +000000E6: 1D75 ADC R23,R5 Add with carry +000000E7: 5E68 SUBI R22,0xE8 Subtract immediate +000000E8: 4F7F SBCI R23,0xFF Subtract immediate with carry +000000E9: 8827 LDD R2,Z+23 Load indirect with displacement +000000EA: 01FA MOVW R30,R20 Copy register pair +000000EB: 8030 LDD R3,Z+0 Load indirect with displacement +000000EC: 2832 OR R3,R2 Logical OR +000000ED: 01FB MOVW R30,R22 Copy register pair +000000EE: 8230 STD Z+0,R3 Store indirect with displacement +000000EF: 01F0 MOVW R30,R0 Copy register pair +000000F0: A407 LDD R0,Z+47 Load indirect with displacement +000000F1: 01FA MOVW R30,R20 Copy register pair +000000F2: 8C10 LDD R1,Z+24 Load indirect with displacement +000000F3: 2810 OR R1,R0 Logical OR +000000F4: 01FB MOVW R30,R22 Copy register pair +000000F5: 8E10 STD Z+24,R1 Store indirect with displacement +000000F6: 01F8 MOVW R30,R16 Copy register pair +000000F7: 8100 LDD R16,Z+0 Load indirect with displacement +000000F8: 01FA MOVW R30,R20 Copy register pair +000000F9: A910 LDD R17,Z+48 Load indirect with displacement +000000FA: 2B10 OR R17,R16 Logical OR +000000FB: 01FB MOVW R30,R22 Copy register pair +000000FC: AB10 STD Z+48,R17 Store indirect with displacement +000000FD: 9523 INC R18 Increment +000000FE: 9601 ADIW R24,0x01 Add immediate to word +000000FF: 953A DEC R19 Decrement +00000100: F009 BREQ PC+0x02 Branch if equal +00000101: CFA8 RJMP PC-0x0057 Relative jump +00000102: EA0A LDI R16,0xAA Load immediate +00000103: BB0B OUT 0x1B,R16 Out to I/O location +00000104: 96EF ADIW R28,0x3F Add immediate to word +00000105: 96EF ADIW R28,0x3F Add immediate to word +00000106: 96EF ADIW R28,0x3F Add immediate to word +00000107: 966B ADIW R28,0x1B Add immediate to word +00000108: 9189 LD R24,Y+ Load indirect and postincrement +00000109: 9199 LD R25,Y+ Load indirect and postincrement +0000010A: 91A9 LD R26,Y+ Load indirect and postincrement +0000010B: 91B9 LD R27,Y+ Load indirect and postincrement +0000010C: 9049 LD R4,Y+ Load indirect and postincrement +0000010D: 9059 LD R5,Y+ Load indirect and postincrement +0000010E: 9508 RET Subroutine return @0000010F: ?C_FUNCALL +0000010F: 0000 NOP No operation @00000110: __exit +00000110: 9588 SLEEP Sleep +00000111: CFFE RJMP PC-0x0001 Relative jump @00000112: ?C_STARTUP +00000112: E50F LDI R16,0x5F Load immediate +00000113: BF0D OUT 0x3D,R16 Out to I/O location +00000114: E001 LDI R16,0x01 Load immediate +00000115: BF0E OUT 0x3E,R16 Out to I/O location +00000116: E4C0 LDI R
-
- Жень, не трать времени - пусть аффтар сам все пишет и считает. Пурга это, а не код - AVR(14.09.2006 19:39, )
- Дальше: в алгоритме сортировки if(time[i]>time[j] k=j; ошибка - megajohn(14.09.2006 19:34, )