?? pre_proc.asm
字號:
.mmregs
.include "tab_ld8a.inc"
.global _Init_Pre_Process
.global _Pre_Process
.ref _Overflow
.bss _y2_hi,1
.bss _y2_lo,1
.bss _y1_hi,1
.bss _y1_lo,1
.bss _x0,1
.bss _x1,1
.bss _x2,1
.global _y2_hi
.global _y2_lo
.global _y1_hi
.global _y1_lo
.global _x0
.global _x1
.text
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;void Init_Pre_Process(void)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
_Init_Pre_Process:
pshm st0
pshm st1
st #0,*(_y2_hi)
st #0,*(_y2_lo)
st #0,*(_y1_hi)
st #0,*(_y1_lo)
st #0,*(_x0)
st #0,*(_x1)
popm st1
popm st0
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;void Pre_Process(
; Word16 signal[], /* input/output signal */
; Word16 lg) /* length of signal */
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
_Pre_Process:
pshm st0
pshm st1
ssbx sxm
ssbx ovm
ssbx frct
stlm a,ar2
stm #a140,ar3
stm #b140,ar4
st #0,*(_Overflow)
;for(i=0; i<lg; i++)
ld *sp(3),a
sub #1,a
stlm a,brc
rptb endrep-1
mvdk *(_x1),*(_x2)
mvdk *(_x0),*(_x1)
mvdk *ar2,*(_x0)
;L_tmp = Mpy_32_16(y1_hi, y1_lo, a140[1])
ld *ar3(1),t
mpy *(_y1_hi),b
mpy *(_y1_lo),a
add a,-15,b
;L_tmp = L_add(L_tmp, Mpy_32_16(y2_hi, y2_lo, a140[2]))
ld *ar3(2),t
mpy *(_y2_hi),a
add a,b
mpy *(_y2_lo),a
add a,-15,b
;L_tmp = L_mac(L_tmp, x0, b140[0])
ld *(_x0),t
mac *ar4(0),b
;L_tmp = L_mac(L_tmp, x1, b140[1])
ld *(_x1),t
mac *ar4(1),b
;L_tmp = L_mac(L_tmp, x2, b140[2])
ld *(_x2),t
mac *ar4(2),b
;L_tmp = L_shl(L_tmp, 3)
ld b,3,b
;signal[i] = round(L_tmp)
ld b,a
add #4000h,1,a
sth a,*ar2+
;y2_hi = y1_hi
mvdk *(_y1_hi),*(_y2_hi)
;y2_lo = y1_lo
mvdk *(_y1_lo),*(_y2_lo)
;L_Extract(L_tmp, &y1_hi, &y1_lo)
sth b,*(_y1_hi)
sub *(_y1_hi),16,b
ld b,-1,b
stl b,*(_y1_lo)
endrep:
xc 2,bov
st #1,*(_Overflow)
xc 2,aov
st #1,*(_Overflow)
popm st1
popm st0
ret
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -