home *** CD-ROM | disk | FTP | other *** search
- \ Nick Didkovsky
-
- \ This word calculates a storage address given a column number and a
- \ XVECTOR descriptor (used in FFT.JF).
- \ Coded in assembler for speed.
- \ 72000 calls of this word coded in forth takes 18.68 seconds
- \ The same number of calls to the word coded in assembler takes 4.36 seconds!
-
- \ Using this in place of forth-coded [I] will reduce time of an FFT.H on a 2048
- \ data point sample from 12 seconds to 9 seconds, and will reduce the IFFT.H
- \ from 10 seconds to 6.6 seconds.
-
- \ Only use this file if you have JForth v1.212 or greater, as it uses
- \ MODULES to link in to the assembler. Comment out the definition of [I]
- \ in the file FFT.JF, and start that file of by include?'ing this one.
-
- DECIMAL
- HASH.OFF
-
- ANEW TASK-I_ASM
-
- ASM [I] ( index vec_desc -- addr_of_entry )
- MOVE.L $0(ORG,TOS.L),D0 ( store num-of-entries in D0)
- CMP.L (DSP),D0
- BGE 2$
- JSR $2F94(ORG) ( ABORT!)
- 2$: CMP.L #$1,(DSP)
- BGE 3$
- JSR $2F94(ORG) ( ABORT!)
- 3$: ADD.L #$10,TOS ( index ok, get to data part of xvector)
- MOVE.L (DSP),D0 ( index)
- SUBQ.L #$1,D0 ( index-1)
- MOVEQ.L #$8,D1
- MULS D1,D0 ( index*8)
- ADD.L D0,TOS ( addr_of_entry)
- ADDQ.L #$4,DSP ( nip)
- END-CODE
-
- hash.on
-