📄 _pi_asm.lst
字号:
A166 MACRO ASSEMBLER _PI_ASM 12/19/2003 11:51:12 PAGE 1
MACRO ASSEMBLER A166 V4.26
OBJECT MODULE PLACED IN _PI_ASM.OBJ
ASSEMBLER INVOKED BY: C:\Program Files\Keil\C166\BIN\A166.EXE _PI_ASM.asm MODV2 SEGMENTED MODV2 SET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
1 ;/*****************************************************************************/
2 ;/* */
3 ;/* Author : Alann Denais */
4 ;/* Infineon Technologies */
5 ;/* */
6 ;/*****************************************************************************/
7 ;/* */
8 ;/* Date : 02-2001 */
9 ;/* */
10 ;/* Execution Time 2.05us @ 40 MHz */
11 ;/* */
12 ;/* */
13 ;/*****************************************************************************/
14 $MACRO
15 $CASE
16 $SEGMENTED
17 $include (Math.inc)
+1 18 ;*************************************************************************************
***
+1 19 ; Notation
+1 20 ; (a,b) in Q31 format : a represent the high part of the number
+1 21 ; b represent the low part of the number
+1 22
+1 23 ;*************************************************************************************
***
+1 24
+1 25 ;*************************************************************************************
***
+1 26 ; MACRO DEFINITION
+1 27 ;*************************************************************************************
***
+1 28
+1 29 ;---------------------------------
+1 30 ; ADDS_Q15 a,b
+1 31 ;_________________________________
+1 32 ; add and saturate two Q15 number
+1 33 ; a, b are in Q15 format
+1 34 ; a = a + b
+1 35 ; modified : a
+1 36 +1 37 +1 38 +1 39 +1 40 +1 41 +1 42 +1 43 +1 44 +1 45 +1 46 +1 47
+1 48
+1 49
+1 50 ;---------------------------------
+1 51 ; ADDS_Q31 a,b,c,d
+1 52 ;_________________________________
+1 53 ; add and saturate two Q31 number
+1 54 ; (a, b) and (c,d) are in Q31 format
A166 MACRO ASSEMBLER _PI_ASM 12/19/2003 11:51:12 PAGE 2
+1 55 ; (a,b) = (a,b) + (c,d)
+1 56 ; modified : a, b
+1 57 +1 58 +1 59 +1 60 +1 61 +1 62 +1 63 +1 64 +1 65 +1 66 +1 67 +1 68 +1 69 +1 70 +1 71
+1 72
+1 73
+1 74 ;---------------------------------
+1 75 ; SUBS_Q15 a,b
+1 76 ;_________________________________
+1 77 ; substract and saturate two Q15 number
+1 78 ; a, b are in Q15 format
+1 79 ; a = a - b
+1 80 ; modified : a
+1 81 +1 82 +1 83 +1 84 +1 85 +1 86 +1 87 +1 88 +1 89 +1 90 +1 91 +1 92
+1 93
+1 94 ;---------------------------------
+1 95 ; SUBS_Q31 a,b,c,d
+1 96 ;_________________________________
+1 97 ; substract and saturate two Q31 number
+1 98 ; (a, b) and (c,d) are in Q31 format
+1 99 ; (a,b) = (a,b) - (c,d)
+1 100 ; modified : a
+1 101 +1 102 +1 103 +1 104 +1 105 +1 106 +1 107 +1 108 +1 109 +1 110 +1 111 +1 112 +1 113 +1 114 +1 115
+1 116 ;---------------------------------
+1 117 ; MULS_Q15 a,b,c
+1 118 ;_________________________________
+1 119 ; multiply and saturate two Q15 number and shift one by left
+1 120 ; a, b are in Q15 format
A166 MACRO ASSEMBLER _PI_ASM 12/19/2003 11:51:12 PAGE 3
+1 121 ; c = a * b result in Q15
+1 122 ; Note: -1*-1= +1
+1 123 ; modified : a,c
+1 124 +1 125 +1 126 +1 127 +1 128 +1 129 +1 130 +1 131 +1 132 +1 133 +1 134 +1 135 +1 136 +1 137 +1 138 +1 139
+1 140
+1 141
+1 142
+1 143 ;---------------------------------
+1 144 ; MULS_Q31 a,b
+1 145 ;_________________________________
+1 146 ; multiply and saturate two Q15 number and shift one by left
+1 147 ; a, b are in Q15 format
+1 148 ; (a,b) = a * b result in Q31
+1 149 ; Note: -1*-1= +1
+1 150 ; modified : a,b, R1
+1 151 ; a,b can't be R1
+1 152 +1 153 +1 154 +1 155 +1 156 +1 157 +1 158 +1 159 +1 160 +1 161 +1 162 +1 163 +1 164 +1 165 +1 166 +1 167 +1 168 +1 169 +1 170
+1 171
+1 172
+1 173 ;---------------------------------
+1 174 ; LIMIT_32 a,b,c,d
+1 175 ;_________________________________
+1 176 ; limits the 32 bit signed number (a,b) by -c,c
+1 177 ; (a, b) are in Q31 format
+1 178 ; c is in Q15 and positiv
+1 179 ; result in Q15
+1 180 ; modified : a,b,c,R1,R2
+1 181 ; a,b,c,d can't be R1 or R2
+1 182 +1 183 +1 184 +1 185 +1 186 A166 MACRO ASSEMBLER _PI_ASM 12/19/2003 11:51:12 PAGE 4
+1 187 +1 188 +1 189 +1 190 +1 191 +1 192 +1 193 +1 194 +1 195 +1 196 +1 197 +1 198 +1 199 +1 200 +1 201 +1 202
+1 203
+1 204
+1 205 ;---------------------------------
+1 206 ; LIMIT_16 a,b,c
+1 207 ;_________________________________
+1 208 ; limits the 16 bit signed number a by -b,b
+1 209 ; b is a 16 bit signed number, positiv
+1 210 ; result in a
+1 211 ; modified : a,b,c
+1 212 +1 213 +1 214 +1 215 +1 216 +1 217 +1 218 +1 219 +1 220 +1 221 +1 222 +1 223 +1 224 +1 225 +1 226 +1 227
+1 228
+1 229
+1 230
+1 231 ;---------------------------------
+1 232 ; MSUB_Q15(a, b, c, d, e)
+1 233 ;_________________________________
+1 234 ; a * b - c * d
+1 235 ; (a, c) and (b, d) are in Q15 format
+1 236 ; (e) result in Q15
+1 237 ; modified : e
+1 238 +1 239 +1 240 +1 241 +1 242 +1 243 +1 244 +1 245 +1 246 +1 247 +1 248 +1 249 +1 250 +1 251 +1 252 A166 MACRO ASSEMBLER _PI_ASM 12/19/2003 11:51:12 PAGE 5
+1 253 +1 254
+1 255
+1 256 ;---------------------------------
+1 257 ; MADD_Q15(a, b, c, d, e)
+1 258 ;_________________________________
+1 259 ; a * c + b * d
+1 260 ; (a, c) and (b, d) are in Q15 format
+1 261 ; (e) result in Q15
+1 262 ; modified : e
+1 263 +1 264 +1 265 +1 266
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -