语音信号μ/A律压缩的DSP软件实现(英文文献+中期报告+源代码+流程图) 第20页
NOP
NOP
BC next4,NTC
LD #1Eh,B
AND B,A
RSBX C
RPT #2
ROL A
ST 4,*AR4
B cmpssover
next4:
BIT *AR3,15-4
NOP
NOP
BC next5,NTC
LD #0Fh,B
AND B,A
RSBX C
RPT #3
ROL A
ST 3,*AR4
B cmpssover
next5:
BIT *AR3,15-3
NOP
NOP
BC next6,NTC
LD #7h,B
AND B,A
RSBX C
RPT #4
ROL A
ST 2,*AR4
B cmpssover
next6:
BIT *AR3,15-2
NOP
NOP
BC next7,NTC
LD #3h,B
AND B,A
RSBX C
RPT #5
ROL A
ST 1,*AR4
B cmpssover
next7:
LD #1h,B
AND B,A
RSBX C
RPT #6
ROL A
ST 0,*AR4
cmpssover:
LDM AR2,B
BC nchgsign,BEQ
LD *AR4,B
RSBX OVM
NEG B
STL B,*AR4
nchgsign:
LD #0Fh,B
AND *AR4,B
OR B,A
STL A,*AR4
NOP
LD *AR3+,A
LD *AR4+,A
LD *AR7+,A
SUB #1,A
STL A,*AR7
BC loop,ANEQ
NOP
STM #1023,*AR7
STM speechsave,AR4
STM speechout,AR3
loop2:
STM 0,AR2
LD #0Fh,B
LD *AR4,A
AND B,A
BIT *AR4,15-1
NOP
NOP
BC nchgsign2,NTC
STM 1,AR2
RSBX OVM
NEG A
AND B,A
nchgsign2:
BC dcmpssover,AEQ
STM 1D00h,AR5
STL A,*AR5
STM 1D01h,AR6
LD #7,A
SUB *AR5,A
STL A,*AR6
LD *AR4,A
LD #0F0h,B
AND B,A
LD #2,B
RSBX C
RPT *AR5
ROL B
ROR B
RPT *AR6
ROR A
ROL A
dcmpssover:
ADD A,B
LDM AR2,A
BC nchgsign3,AEQ
RSBX OVM
NEG B
nchgsign3:
STL B,*AR3
NOP
LD *AR3+,A
LD *AR4+,A
LD *AR7+,A
www.751com.cn
附录Ⅱ:源程序配置文件
-e start
MEMORY {
PAGE 0:
vectorram: origin = 1C00h length = 0080h
textram: origin = 0100h length = 0F00h
PAGE 1:
bssram: origin = 0080h length = 1000h
stackram: origin = 1100h length = 0400h
constram: origin = 1500h length = 0100h
dataram: origin = 1600h length =1000h
userram: origin = 2D00h length = 0200h
}
SECTIONS{
.text : > textram PAGE 0
.bss : > bssram PAGE 1
.stack : > stackram PAGE 1
.const : > constram PAGE 1
.data : > dataram PAGE 1
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]