?? rfft256.asm
字號:
;***********************************************************
; Version 2.20.01
;***********************************************************
;*****************************************************************************
; Function: rfft256
; Description: real FFT
;
; Copyright Texas instruments Inc, 1998
;-----------------------------------------------------------------------------
; Revision History:
;
; 1.00Beta R. Piedra, 8/31/98. Original real FFT code.
; - C-callable
; - Created unpack macro
; - Uses cfft.asm code version 1.00Beta
;
; 1.00 A. Aboagye 10/15/98
; - added scale option as a parameter
; 2.00 Li Yuan 05/07/01
; - fixed stack pointer index
;
;*****************************************************************************
N .set 128 ; NUMBER OF POINTS FOR FFT
NREAL .set 256 ; NUMBER OF POINTS FOR FFT(real)
.include "macros.asm"
.include "unpack.asm"
.include "sintabr.q15"
.mmregs
; Far-mode adjustment
; -------------------
.if __far_mode
offset .set 1 ; far mode uses one extra location for ret addr ll
.else
offset .set 0
.endif
.asg (0), DATA
.asg (1), SIN45
.asg (4), save_ar7 ; stack description
.asg (5), save_ar6 ; stack description
.asg (6), save_ar1
.asg (7), ret_addr
.asg (8+offset), scale
; x in A
;*****************************************************************************
.def _rfft256
.text
_rfft256
; Preserve registers
; ------------------
pshm ar1
pshm ar6
pshm ar7
PSHM ST0 ; 1 cycle
PSHM ST1 ; 1 cycle
RSBX OVA ; 1 cycle
RSBX OVB ; 1 cycle
; Preserve local variables
; ------------------------
frame -2
nop
; Get Arguments
; -------------
stl a,*sp(DATA)
.if N>4 ; ??? no need
st #5a82h,*sp(SIN45)
.endif
; Set modes
; ---------
orm #0100010101011110b,*(ST1) ; ASM=-2 , FRACT=1, sbx=1;CPL=1(compiler)
; Execute
; -------
combo5xx ; FFT CODE for STAGES 1 and 2
stage3 ; MACRO WITH CODE FOR STAGE 3
stdmacro 4,8,8,16,sin4,cos4 ; stage,outloopcnter,loopcnter,index
stdmacro 5,4,16,32,sin5,cos5 ; stage,outloopcnter,loopcnter,index
stdmacro 6,2,32,64,sin6,cos6 ; stage,outloopcnter,loopcnter,index
laststag 7,sin7,cos7 ; MACRO WITH CODE FOR STAGE 7
unpack sin8,cos8
; Return
;--------
frame +2
POPM ST1 ; 1 cycle
POPM ST0 ; 1 cycle
popm ar7
popm ar6
popm ar1
.if __far_mode
fretd
.else
retd
.endif
nop
nop
;end of file. please do not remove. it is left here to ensure that no lines of code are removed by any editor
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -