?? _crc_algs.lst
字號:
###############################################################################
# #
# 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 #
# #
###############################################################################
1 000000
2 000000 /***********************************************
***********************************
3 000000 FUNCTIONS: 16/32-bit CRC Algorithms,
bitwsie and table methods in assembly
4 000000 AUTHOR: Emil Lenchak
5 000000 DATE: March, 2004
6 000000 COPYRIGHT: Texas Instruments, 2004
7 000000 TOOLS: Built with IAR Kickstart
V2
8 000000 ************************************************
***********************************/
9 000000
10 000000 #include "msp430x16x.h"
11 000000 #include "..\inc\crc.h"
12 000000
13 000000 ;C callable assembly, file: _crc_algs.s4
3
14 000000 ;arg1 > [R13:]R12, arg2 > [R15:]R14,
others stack
15 000000 ;result > [R13:]R12
16 000000
17 000000 ;R0:R2, system registers
18 000000 ;R3 constant generator
19 000000 ;R4:R5, reserved for ROM monitor mode,
else GP
20 000000 ;R6:R11, 6 general purpose registers
21 000000 ;R12:R15, reserved for passing
args
22 000000
23 000000 NAME CRC16_BITWISE
24 000000
25 000000 ;unsigned short crc16MakeBitByBit(unsigned short
crc, unsigned short poly,
26 000000 ; unsigned char
*pmsg, int msg_size)
27 000000
28 000000 PUBLIC __crc16MakeBitwise
29 000000 RSEG CODE
30 000000
31 000000 __crc16MakeBitwise
32 000000
33 000000 #define r_crc R12
34 000000 #define r_poly R14
35 000000
36 000000 #define r_msg R7
37 000000 #define r_tmp R8
38 000000 #define r_bitcnt R8
39 000000 #define r_j R9
40 000000 #define r_msg_size R10
41 000000 #define r_pmsg R11
42 000000
43 000000 _a
44 000000 0712 PUSH R7
45 000002 0812 PUSH R8
46 000004 0912 PUSH R9
47 000006 0A12 PUSH R10
48 000008 0B12 PUSH R11
49 00000A _b
50 00000A 1B410C00 MOV (_b-_a+2)(SP),r_pmsg
; CAREFUL,
frame pointer may
change
51 00000E 1A410E00 MOV (_b-_a+4)(SP),r_msg_size
; CAREFUL,
frame pointer may
change
52 000012
53 000012 774B MOV.B @r_pmsg+,r_msg
54 000014 8710 SWPB r_msg
55 000016 784B MOV.B @r_pmsg+,r_tmp
56 000018 07D8 BIS r_tmp,r_msg ;
OR
57 00001A 0CE7 XOR r_msg,r_crc
58 00001C
59 00001C 3842 MOV #8,r_bitcnt
60 00001E _outter_loop
61 00001E 774B MOV.B @r_pmsg+,r_msg
62 000020 8710 SWPB r_msg
63 000022 0948 MOV r_bitcnt,r_j
64 000024 _inner_loop
65 000024 0757 RLA r_msg
66 000026 0C6C RLC r_crc
67 000028 0128 JNC _continue
68 00002A 0CEE XOR r_poly,r_crc
69 00002C _continue
70 00002C 1983 DEC r_j
71 00002E FA23 JNZ _inner_loop
72 000030 1A83 DEC r_msg_size
73 000032 F523 JNZ _outter_loop
74 000034 #if (CRC16_FINAL_XOR != 0)
76 000034 #endif
77 000034 3B41 POP R11
78 000036 3A41 POP R10
79 000038 3941 POP R9
80 00003A 3841 POP R8
81 00003C 3741 POP R7
82 00003E 3041 RET
83 000040
84 000040 ;crc is already in R12, return
register
85 000040
86 000040 #undef r_crc
87 000040 #undef r_poly
88 000040 #undef r_msg
89 000040 #undef r_tmp
90 000040 #undef r_bitcnt
91 000040 #undef r_j
92 000040 #undef r_msg_size
93 000040 #undef r_pmsg
94 000040
95 000040 ENDMOD
##############################
# CRC:9DB7 #
# Errors: 0 #
# Warnings: 0 #
# Bytes: 64 #
##############################
###############################################################################
# #
# 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 #
# #
###############################################################################
96 000000
97 000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;
98 000000
99 000000 NAME CRC16R_BITWISE
100 000000
101 000000 ;unsigned short crc16rMakeBitByBit(unsigned
short crc, unsigned short poly,
102 000000 ; unsigned char
*pmsg, int msg_size)
103 000000
104 000000 PUBLIC __crc16rMakeBitwise
105 000000 RSEG CODE
106 000000
107 000000 __crc16rMakeBitwise
108 000000
109 000000 #define r_crc R12
110 000000 #define r_poly R14
111 000000
112 000000 #define r_msg R7
113 000000 #define r_tmp R8
114 000000 #define r_bitcnt R8
115 000000 #define r_j R9
116 000000 #define r_msg_size R10
117 000000 #define r_pmsg R11
118 000000
119 000000 _a
120 000000 0712 PUSH R7
121 000002 0812 PUSH R8
122 000004 0912 PUSH R9
123 000006 0A12 PUSH R10
124 000008 0B12 PUSH R11
125 00000A _b
126 00000A 1B410C00 MOV (_b-_a+2)(SP),r_pmsg
; CAREFUL,
frame pointer may
change
127 00000E 1A410E00 MOV (_b-_a+4)(SP),r_msg_size
; CAREFUL,
frame pointer may
change
128 000012
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -