📄 xsdispa.asm
字号:
LDF *AR4++(IR0)%,R6
MPYF 2,R6
STF R6,@temp1
BR loop1
fmode4: LDI 390,IR0
LDF *AR4++(IR0)%,R6
MPYF 2,R6 ;signal -2~2
STF R6,@temp1
BR loop1
loop1: LDI 1,R6 ;process the data from AIC
CMPI @anlgprdet,R6
BZ anlgprofa ;enter into anolog protect mode
LDF @input1,R2 ;otherwise enter into standard work mode
PUSH R2 ;to sub from the R2 exponent 14
PUSHF R2 ;-2^14~2^14==>-1~1
POPF R2
ASH -32,R2
SUBI 14,R2
ASH 32,R2
POP R2
LDI audcofaddr,AR0 ;decide the two iir filter cofficient
LDI daudtra,AR1
LDI 3,BK
LDI 4,IR0
LDI 28,IR1
LDI 6,RC
CALL iir
ADDF @temp1,R0 ;do the first data filtering
STF R0,@temp1 ;the result was saved in R0->temp1
LDF @input2,R2 ;@temp1 will be read by dispB
PUSH R2 ;to sub from the R2 exponent 14
PUSHF R2
POPF R2
ASH -32,R2
SUBI 14,R2
ASH 32,R2
POP R2
LDI yudcofaddr,AR0
LDI dyudtra,AR1
;LDI 32,IR1
;LDI 7,RC
CALL iir ;do the second data filtering add the
ADDF @temp1,R0 ;result of result 1
PUSH R0 ;to sub from the R2 exponent 14
PUSHF R0
POPF R0
ASH -32,R0
ADDI 13,R0
ASH 32,R0
POP R0
FIX R0
STI R0,@temp1 ;@temp1 will be fetched by dispB
BR receyn
anlgprofa: LDF @input3,R2
PUSH R2 ;to sub from the R2 exponent 14
PUSHF R2
POPF R2
ASH -32,R2
SUBI 14,R2
ASH 32,R2
POP R2
LDI yudo_cf9,AR0
LDI dyudtra,AR1
;LDI 4,IR0
;LDI 32,IR1
;LDI 7,RC
CALL iir
ADDF @temp1,R0
PUSH R0 ;to sub from the R2 exponent 14
PUSHF R0
POPF R0
ASH -32,R0
ADDI 13,R2
ASH 32,R0
POP R0
FIX R0
STI R0,@temp1
BR receyn
;********************************************************************
;the following is receive data
;********************************************************************
sigpro2: LDI 0,R6
STI R6,@todisp1 ;clear the flag which point dispB->dispA
LDI 1,R6
CMPI @junhenyn,R6 ;to decide do junhen or not
BLO dojunhensh ;junhen=1 do junhen otherwise to detect
LDI @xinning,R6
CMPI 1,R6 ;to select the signaling iir filter
BZ shsigmode1
CMPI 2,R6
BZ shsigmode2
CMPI 3,R6
BZ shsigmode3
CMPI 4,R6
BZ shsigmode4
shsigmode1:
LDI sig1,AR0
LDI dsig,AR1
LDI 3,BK
LDI 4,IR0
LDI 12,IR1
LDI 2,RC
CALL iir ;single frequency ASK 2220khz
LDF R0,R2
LDI sig1det,AR0
LDI dsigdet,AR1
CALL iir1
LDF 0.97964155673981,R4
MPYF *AR1,R4 ;only one biquad R0 is the real part of the result
MPYF R4,R4 ;and 0.9796...is the sinw0
MPYF R0,R0
ADDF R4,R0
CMPF 98.0,R0 ;if R0 >49 set the M line
BGT shmode1
LDI 1,R0 ;else reset the M line
STI R0,@mtransmit
BR receive
shmode1: LDI 0,R0
STI R0,@mtransmit
BR receive
shsigmode2: LDI sig2,AR0
LDI dsig,AR1
LDI 3,BK
LDI 4,IR0
LDI 12,IR1
LDI 2,RC
CALL iir ;single frequency ASK 3780khz
LDF R0,R2
LDI sig2det,AR0
LDI dsigdet,AR1
CALL iir1
LDF 0.69018507003784,R4
MPYF *AR1,R4
;only one biquad R0 is the real part of the result
MPYF R4,R4 ;and 0.6901...is the sinw0
MPYF R0,R0
ADDF R4,R0
CMPF 98.0,R0 ;if R0 >49 set the M line
BGT shmode2
LDI 1,R0 ;else reset the M line
STI R0,@mtransmit
BR receive
shmode2: LDI 0,R0
STI R0,@mtransmit
BR receive
shsigmode3:
LDI sig3,AR0
LDI dsig,AR1
LDI 3,BK
LDI 4,IR0
LDI 12,IR1
LDI 2,RC
CALL iir ;single frequency FSK 2190khz
LDF R0,R2
LDI sig3det,AR0
LDI dsigdet,AR1
CALL iir1
LDF 0.97618508338928,R4
MPYF *AR1,R4
;only one biquad R0 is the real part of the result
MPYF R4,R4 ;and 0.9761...is the sinw0
MPYF R0,R0
ADDF R4,R0
CMPF 98.0,R0 ;if R0 >49 set the M line
BGT shmode3
LDI 1,R0 ;else reset the M line
STI R0,@mtransmit
;*******************************************
;the following will decide if i'll do junhen
;*******************************************
LDI sig5,AR0
LDI dsig2,AR1
LDI 3,BK
LDI 4,IR0
LDI 12,IR1
LDI 2,RC
CALL iir ;single frequency FSK 2250khz
LDF R0,R2
LDI sig5det,AR0
LDI dsigdet2,AR1
CALL iir1
LDF 0.98274993896484,R4
MPYF *AR1,R4 ;i can't ensure AR1 is pointting to d(n-1)?!!
;only one biquad R0 is the real part of the result
MPYF R4,R4 ;and 0.9761...is the sinw0
MPYF R0,R0
ADDF R4,R0
CMPF 98.0,R0 ;if R0 >49 set the M line
BGT dojunhen
;************************************
;do junhen or not?
;************************************
BR receive
shmode3: LDI 0,R0
STI R0,@mtransmit
BR receive
shsigmode4:
LDI sig4,AR0
LDI dsig,AR1
LDI 3,BK
LDI 4,IR0
LDI 12,IR1
LDI 2,RC
CALL iir ;single frequency FSK 3750khz
LDF R0,R2
LDI sig4det,AR0
LDI dsigdet,AR1
CALL iir1
LDF 0.70357120037079,R4
MPYF *AR1,R4
;only one biquad R0 is the real part of the result
MPYF R4,R4 ;and 0.7035...is the sinw0
MPYF R0,R0
ADDF R4,R0
CMPF 98.0,R0 ;if R0 >49 set the M line
BLT shmode1
LDI 1,R0 ;else reset the M line
STI R0,@mtransmit
BR receive
shmode4: LDI 0,R0
STI R0,@mtransmit
; BR receive
receive: LDI @todisp2,R2
FLOAT R2
PUSH R2 ;to sub from the R2 exponent 14
PUSHF R2
POPF R2
ASH -32,R2
SUBI 13,R2
ASH 32,R2
POP R2 ;now the data change to float -4~4
LDI 1,R6
CMPI @anlgprdet,R6
BZ anlgprosh ;enter into anolog protect mode
;processing the data from dispB
;standard work mode
;@todisp2 stored the data from dispB to disA
LDI audcoshaddr,AR0 ;do receive filtering
LDI daudrec,AR1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -