p_parity.asm
来自「TI C54写的G729代码,视线8kbps高质量语音解码,汇编优化」· 汇编 代码 · 共 58 行
ASM
58 行
;==========================================================================
; File Name
; ----------
; P_PARITY.ASM
;
; Brief Description of the Code:
; ------------------------------
; Parity_pitch - compute parity bit for first 6 MSBs
;
; Ref
; ------
; P_PARITY.C
;==========================================================================
.mmregs
.include ..\include\const.h
.include ..\include\tab_ld8a.h
.include ..\include\ld8amem.h
;---------------------------------------------------------------------------
; Parity_Pitch
;---------------------------------------------------------------------------
; Word16 Parity_Pitch( /* output: parity bit (XOR of 6 MSB bits) */
; Word16 pitch_index /* input : index for which parity to compute */
; )
;-----------------------------------------------------------------------
;
; Input Registers : B = pitch_index
;
; Output Registers : A = Word16 Parity_Pitch(Word16 pitch_index)
;
; Modified Registers : DP, A, B, AR2
;
;---------------------------------------------------------------------------
.text
.def Parity_Pitch
.asg "AR2", pZero
.asg "Addr_local_buf2",zero
Parity_Pitch:
STM #6 - 1, BRC
SFTL B,-2
ST #0,*(zero)
LD #1, A
RPTBD EndParity_Pitch - 1
STM #zero, pZero
SFTL B, -1 ;C(Carry bit)=temp&(Word16)1;
ADDC *pZero, A
EndParity_Pitch:
RETD
AND #1, A
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?