-
Notifications
You must be signed in to change notification settings - Fork 0
/
mul.s
59 lines (38 loc) · 1.45 KB
/
mul.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
;This file was generated by dsPIC Filter Design Software
; ..............................................................................
; File mul.s
; ..............................................................................
; ..............................................................................
; Allocate and intialize filter structure
;.section .data
; .global _variables
;zzz:
;.hword 0x0000
;w8temp:
;.hword 0x0000
;factor:
;.hword 0x0000
;..................................................................................
; .section *, code ;<-Syntax supported in MPLAB C30
;v1.30 and later
.global _MPY ; export
_MPY:
;............................................................................
; Save working registers.
;push w1
;push w2
;............................................................................
;bset CORCON, #0
mov w0,w4
mov w1,w5
mpy w4*w5,a
sac a,#15,w0
;............................................................................
; Restore working registers.
;pop w2
;pop w1
;............................................................................
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;............................................................................
.end