📄 _crc_algs.lst
字号:
260 000000
261 000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
262 000000
263 000000 NAME CRC32R_BITWISE
264 000000
265 000000 ;unsigned long __crc32rMakeBitByBit(unsigned
long crc, unsigned long poly,
266 000000 ; unsigned char *pmsg,
unsigned int msg_size)
267 000000
268 000000 PUBLIC __crc32rMakeBitwise
269 000000 RSEG CODE
270 000000
271 000000 __crc32rMakeBitwise
272 000000
273 000000 #define r_crc_h R13
274 000000 #define r_crc_l R12
275 000000 #define r_poly_h R15
276 000000 #define r_poly_l R14
277 000000
278 000000 #define r_msg R7
279 000000 #define r_tmp R8
280 000000 #define r_bitcnt R8
281 000000 #define r_j R9
282 000000 #define r_msg_size R10
283 000000 #define r_pmsg R11
284 000000
285 000000 _a
286 000000 0712 PUSH R7
287 000002 0812 PUSH R8
288 000004 0912 PUSH R9
289 000006 0A12 PUSH R10
290 000008 0B12 PUSH R11
291 00000A _b
292 00000A 1B410C00 MOV (_b-_a+2)(SP),r_pmsg
; CAREFUL, frame
pointer may change
293 00000E 1A410E00 MOV (_b-_a+4)(SP),r_msg_size
; CAREFUL,
frame pointer may
change
294 000012
295 000012 774B MOV.B @r_pmsg+,r_msg
296 000014 784B MOV.B @r_pmsg+,r_tmp
297 000016 8810 SWPB r_tmp
298 000018 07D8 BIS r_tmp,r_msg ;
OR
299 00001A 0CE7 XOR r_msg,r_crc_l
300 00001C
301 00001C 774B MOV.B @r_pmsg+,r_msg
302 00001E 784B MOV.B @r_pmsg+,r_tmp
303 000020 8810 SWPB r_tmp
304 000022 07D8 BIS r_tmp,r_msg ;
OR
305 000024 0DE7 XOR r_msg,r_crc_h
306 000026
307 000026 3842 MOV #8,r_bitcnt
308 000028 _outter_loop
309 000028 774B MOV.B @r_pmsg+,r_msg
310 00002A 0948 MOV r_bitcnt,r_j
311 00002C _inner_loop
312 00002C 0711 RRA r_msg
313 00002E 0D10 RRC r_crc_h
314 000030 0C10 RRC r_crc_l
315 000032 0228 JNC _continue
316 000034 0DEF XOR r_poly_h,r_crc_h
317 000036 0CEE XOR r_poly_l,r_crc_l
318 000038 _continue
319 000038 1983 DEC r_j
320 00003A F823 JNZ _inner_loop
321 00003C 1A83 DEC r_msg_size
322 00003E F423 JNZ _outter_loop
323 000040 #if (CRC32R_FINAL_XOR != 0)
324 000040 3DE3 XOR #(CRC32R_FINAL_XOR>>16),
r_crc_h
325 000042 3CE3 XOR #(CRC32R_FINAL_XOR&0xFFF
F),r_crc_l
326 000044 #endif
327 000044 3B41 POP R11
328 000046 3A41 POP R10
329 000048 3941 POP R9
330 00004A 3841 POP R8
331 00004C 3741 POP R7
332 00004E 3041 RET
333 000050
334 000050 ;crc is already in R13:R12, return
registers
335 000050
336 000050 #undef r_crc_h
337 000050 #undef r_crc_l
338 000050 #undef r_poly_h
339 000050 #undef r_poly_l
340 000050 #undef r_msg
341 000050 #undef r_tmp
342 000050 #undef r_bitcnt
343 000050 #undef r_j
344 000050 #undef r_msg_size
345 000050 #undef r_pmsg
346 000050
347 000050 ENDMOD
##############################
# CRC:445E #
# Errors: 0 #
# Warnings: 0 #
# Bytes: 80 #
##############################
###############################################################################
# #
# IAR Systems MSP430 Assembler V2.21B/W32 17/Aug/2004 19:23:25 #
# Copyright 1996-2003 IAR Systems. All rights reserved. #
# #
# Source file = C:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\src\_crc_algs.s43#
# List file = C:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\MSP430\Debug\List\_crc_algs.lst#
# Object file = C:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\MSP430\Debug\Obj\_crc_algs.r43#
# Command line = -OC:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\MSP430\Debug\Obj\ #
# -s+ -M<> -w+ #
# -LC:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\MSP430\Debug\List\ #
# -t8 #
# -IC:\Program Files\IAR Systems\Embedded Workbench 3.2\430\inc\ #
# -r #
# C:\Program Files\IAR Systems\Embedded Workbench 3.2\myProjects\CRC\src\_crc_algs.s43 #
# #
###############################################################################
348 000000
349 000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
350 000000
351 000000 NAME CRC16_TABLE
352 000000
353 000000 ;unsigned short __crc16MakeTableMethod(unsigned
short crc, unsigned short *table,
354 000000 ; unsigned
char *pmsg, unsigned int msg_size)
355 000000
356 000000 PUBLIC __crc16MakeTableMethod
357 000000 RSEG CODE
358 000000
359 000000 __crc16MakeTableMethod
360 000000
361 000000 #define r_crc R12
362 000000 #define r_ptable R14
363 000000
364 000000 #define r_mask R8
365 000000 #define r_index R9
366 000000 #define r_msg_size R10
367 000000 #define r_pmsg R11
368 000000
369 000000 _a
370 000000 0812 PUSH R8
371 000002 0912 PUSH R9
372 000004 0A12 PUSH R10
373 000006 0B12 PUSH R11
374 000008 _b
375 000008 1B410A00 MOV (_b-_a+2)(SP),r_pmsg
; CAREFUL, frame
pointer may change
376 00000C 1A410C00 MOV (_b-_a+4)(SP),r_msg_size
; CAREFUL,
frame pointer may
change
377 000010 384000FF MOV #0xFF00,r_mask
378 000014 _loop
379 000014 8C10 SWPB r_crc
380 000016 494C MOV.B r_crc,r_index
381 000018 79EB XOR.B @r_pmsg+,r_index
382 00001A 0959 ADD r_index,r_index
383 00001C 095E ADD r_ptable,r_index
384 00001E 0CF8 AND r_mask,r_crc
385 000020 2CE9 XOR @r_index,r_crc
386 000022 1A83 DEC r_msg_size
387 000024 F723 JNZ _loop
388 000026 #if (CRC16_FINAL_XOR != 0)
390 000026 #endif
391 000026 3B41 POP R11
392 000028 3A41 POP R10
393 00002A 3941 POP R9
394 00002C 3841 POP R8
395 00002E 3041 RET
396 000030
397 000030 ;crc is already in R12, return
register
398 000030
399 000030 #undef r_crc
400 000030 #undef r_ptable
401 000030 #undef r_mask
402 000030 #undef r_index
403 000030 #undef r_msg_size
404 000030 #undef r_pmsg
405 000030
406 000030 ENDMOD
##############################
# CRC:AC94 #
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -