📄 p_parity.asm
字号:
;==========================================================================
; 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -