?? crc_main.lst
字號:
129 printf("CRC16_asm: 0x%X(R)\n", crc16);
130 #endif
131
132 // calculate CRC with table method
133 crc16 = crc16MakeTableMethod(CRC16_INIT_REM, crc16Table, msg, length);
134 printf("CRC16_tab: 0x%X(N)\n", crc16);
135
136 // calculate reflected CRC with table method
137 crc16 = crc16rMakeTableMethod(CRC16R_INIT_REM, crc16rTable, msg, length);
138 printf("CRC16_tab: 0x%X(R)\n", crc16);
139
140 #ifdef __ICC430__
141 //calculate CRC with table method in assembly
142 crc16 = __crc16MakeTableMethod(CRC16_INIT_REM, crc16Table, msg, length);
143 printf("CRC16_tasm: 0x%X(N)\n", crc16);
144 #endif
145 // print expected CRCs
146 printf("CRC16_exp: 0x%X(N)\n", CRC16_CHECK);
147 printf("CRC16_exp: 0x%X(R)\n\n", CRC16R_CHECK);
148
149 // calculate CRC brute force alg (optimized implementation for C)
150 crc32 = crc32MakeBitwise(CRC32_INIT_REM, CRC32_POLY, msg, length);
151 printf("CRC32_bit: 0x%lX(N)\n", crc32);
152
153 // calculate CRC brute force alg version #2 (same implementation as assembly routine)
154 crc32 = crc32MakeBitwise2(CRC32_INIT_REM, CRC32_POLY, msg, length);
155 printf("CRC32_bit: 0x%lX(N)\n", crc32);
156
157 #ifdef __ICC430__
158 // calculate CRC brute force alg in assembly
159 crc32 = __crc32MakeBitwise(CRC32_INIT_REM, CRC32_POLY, msg, length);
160 printf("CRC32_asm: 0x%lX(N)\n", crc32);
161
162 // calculate reflected CRC brute force alg in assembly
163 crc32 = __crc32rMakeBitwise(CRC32R_INIT_REM, CRC32R_POLY, msg, length);
164 printf("CRC32_asm: 0x%lX(R)\n", crc32);
165 #endif
166
167 // calculate CRC with table method
168 crc32 = crc32MakeTableMethod(CRC32_INIT_REM, crc32Table, msg, length);
169 printf("CRC32_tab: 0x%lX(N)\n", crc32);
170
171 // calculate reflected CRC with table method
172 crc32 = crc32rMakeTableMethod(CRC32R_INIT_REM, crc32rTable, msg, length);
173 printf("CRC32_tab: 0x%lX(R)\n", crc32);
174
175 #ifdef __ICC430__
176 //calculate CRC with table method in assembly
177 crc32 = __crc32MakeTableMethod(CRC32_INIT_REM, crc32Table, msg, length);
178 printf("CRC32_tasm: 0x%lX(N)\n", crc32);
179 #endif
180 // print expected CRCs
181 printf("CRC32_exp: 0x%lX(N)\n", CRC32_CHECK);
182 printf("CRC32_exp: 0x%lX(R)\n\n", CRC32R_CHECK);
183
184 #ifdef WIN32
185 printf("Press any key to continue\n");
186 printf("%c\n", getch());
187 #endif
188
189 return 0;
190 }
191
192 /************************* END MAIN ************************************/
Maximum stack usage in bytes:
Function CSTACK
-------- ------
main 58
-> msp430Init 2
-> printf 4
-> crc16MakeBitwise 8
-> printf 6
-> crc16MakeBitwise2 10
-> printf 8
-> __crc16MakeBitwise 12
-> printf 10
-> __crc16rMakeBitwise 14
-> printf 12
-> crc16MakeTableMethod 16
-> printf 14
-> crc16rMakeTableMethod 18
-> printf 16
-> __crc16MakeTableMethod 20
-> printf 18
-> printf 20
-> printf 22
-> crc32MakeBitwise 26
-> printf 26
-> crc32MakeBitwise2 30
-> printf 30
-> __crc32MakeBitwise 34
-> printf 34
-> __crc32rMakeBitwise 38
-> printf 38
-> crc32MakeTableMethod 42
-> printf 42
-> crc32rMakeTableMethod 46
-> printf 46
-> __crc32MakeTableMethod 50
-> printf 50
-> printf 54
-> printf 58
Segment part sizes:
Function/Label Bytes
-------------- -----
msg 20
main 544
?<Initializer for msg> 20
?<Constant "CRC32_exp: 0x%lX(R)\n\n">
22
?<Constant "CRC32_exp: 0x%lX(N)\n">
21
?<Constant "CRC32_tasm: 0x%lX(N)\n">
22
?<Constant "CRC32_tab: 0x%lX(R)\n">
21
?<Constant "CRC32_tab: 0x%lX(N)\n">
21
?<Constant "CRC32_asm: 0x%lX(R)\n">
21
?<Constant "CRC32_asm: 0x%lX(N)\n">
21
?<Constant "CRC32_bit: 0x%lX(N)\n">
21
?<Constant "CRC16_exp: 0x%X(R)\n\n">
21
?<Constant "CRC16_exp: 0x%X(N)\n">
20
?<Constant "CRC16_tasm: 0x%X(N)\n">
21
?<Constant "CRC16_tab: 0x%X(R)\n">
20
?<Constant "CRC16_tab: 0x%X(N)\n">
20
?<Constant "CRC16_asm: 0x%X(R)\n">
20
?<Constant "CRC16_asm: 0x%X(N)\n">
20
?<Constant "CRC16_bit: 0x%X(N)\n">
20
?<Constant "\nMessage: %s\n\n">
15
544 bytes in segment CODE
347 bytes in segment DATA16_C
20 bytes in segment DATA16_I
20 bytes in segment DATA16_ID
544 bytes of CODE memory
367 bytes of CONST memory
20 bytes of DATA memory
Errors: none
Warnings: 1
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -