📄 crc16.lst
字号:
###############################################################################
# #
# 25/May/2009 02:53:22 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM #
# Copyright 1999-2008 IAR Systems AB. #
# #
# Cpu mode = arm #
# Endian = little #
# Source file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\external_libs\crc\crc16.c #
# Command line = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\external_libs\crc\crc16.c -D at91sam7x256 #
# -D flash -D TRACE_LEVEL=4 -lC #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\ --remarks --diag_suppress #
# Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
# 4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
# started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
# d-project\ewp\at91sam7x256_flash\Obj\ --no_cse #
# --no_unroll --no_inline --no_code_motion --no_tbaa #
# --no_clustering --no_scheduling --debug --endian=little #
# --cpu=ARM7TDMI -e --fpu=None --dlib_config "C:\Program #
# Files (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\DLib_Config_Full.h" -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/peripherals\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
# 25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
# ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
# rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/components\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/boards/at91sam7x-ek\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\external_libs/crc\ -I "C:\Program Files #
# (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh #
# List file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\crc16.lst #
# Object file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\Obj\crc16.o #
# #
# #
###############################################################################
F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\external_libs\crc\crc16.c
1 /*
2 * crc16.c
3 *
4 * This source code is licensed under the GNU General Public License,
5 * Version 2. See the file COPYING for more details.
6 */
7
8 //#include <linux/types.h>
9 //#include <linux/module.h>
10 //#include <linux/crc16.h>
11 #include "crc16.h"
\ In section .text, align 4, keep-with-next
\ static __??Code32?? __code __interwork unsigned short crc16_byte(unsigned short, unsigned char const)
\ crc16_byte:
\ 00000000 001021E0 EOR R1,R1,R0
\ 00000004 FF1001E2 AND R1,R1,#0xFF
\ 00000008 14209FE5 LDR R2,??crc16_byte_0 ;; crc16_table
\ 0000000C 811082E0 ADD R1,R2,R1, LSL #+1
\ 00000010 B010D1E1 LDRH R1,[R1, #+0]
\ 00000014 200421E0 EOR R0,R1,R0, LSR #+8
\ 00000018 0008A0E1 MOV R0,R0, LSL #+16
\ 0000001C 2008A0E1 MOV R0,R0, LSR #+16
\ 00000020 1EFF2FE1 BX LR ;; return
\ ??crc16_byte_0:
\ 00000024 ........ DC32 crc16_table
12
13 /** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */
\ In section .rodata, align 4
14 u16 const crc16_table[256] = {
\ crc16_table:
\ 00000000 0000C1C081C1 DC16 0, 49345, 49537, 320, 49921, 960, 640, 49729, 50689, 1728, 1920
\ 400101C3C003
\ 800241C201C6
\ C0068007
\ 00000016 41C70005C1C5 DC16 51009, 1280, 50625, 50305, 1088, 52225, 3264, 3456, 52545, 3840
\ 81C4400401CC
\ C00C800D41CD
\ 000F
\ 0000002A C1CF81CE400E DC16 53185, 52865, 3648, 2560, 51905, 52097, 2880, 51457, 2496, 2176
\ 000AC1CA81CB
\ 400B01C9C009
\ 8008
\ 0000003E 41C801D8C018 DC16 51265, 55297, 6336, 6528, 55617, 6912, 56257, 55937, 6720, 7680
\ 801941D9001B
\ C1DB81DA401A
\ 001E
\ 00000052 C1DE81DF401F DC16 57025, 57217, 8000, 56577, 7616, 7296, 56385, 5120, 54465, 54657
\ 01DDC01D801C
\ 41DC0014C1D4
\ 81D5
\ 00000066 401501D7C017 DC16 5440, 55041, 6080, 5760, 54849, 53761, 4800, 4992, 54081, 4352
\ 801641D601D2
\ C012801341D3
\ 0011
\ 0000007A C1D181D04010 DC16 53697, 53377, 4160, 61441, 12480, 12672, 61761, 13056, 62401
\ 01F0C0308031
\ 41F10033C1F3
\ 0000008C 81F240320036 DC16 62081, 12864, 13824, 63169, 63361, 14144, 62721, 13760, 13440
\ C1F681F74037
\ 01F5C0358034
\ 0000009E 41F4003CC1FC DC16 62529, 15360, 64705, 64897, 15680, 65281, 16320, 16000, 65089
\ 81FD403D01FF
\ C03F803E41FE
\ 000000B0 01FAC03A803B DC16 64001, 15040, 15232, 64321, 14592, 63937, 63617, 14400, 10240
\ 41FB0039C1F9
\ 81F840380028
\ 000000C2 C1E881E94029 DC16 59585, 59777, 10560, 60161, 11200, 10880, 59969, 60929, 11968
\ 01EBC02B802A
\ 41EA01EEC02E
\ 000000D4 802F41EF002D DC16 12160, 61249, 11520, 60865, 60545, 11328, 58369, 9408, 9600, 58689
\ C1ED81EC402C
\ 01E4C0248025
\ 41E5
\ 000000E8 0027C1E781E6 DC16 9984, 59329, 59009, 9792, 8704, 58049, 58241, 9024, 57601, 8640
\ 40260022C1E2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -