home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
326.lha
/
KFFT_v1.1
/
fftmisc
< prev
next >
Wrap
Text File
|
1989-12-23
|
785b
|
26 lines
\ Miscelaneous Support Words for KFFT - also in fft.asm
\ Jerry Kallaus 02/14/89
\
anew task-miscfft
: 2** ( n -- 2**n ) 1 swap +shift both ;
: NOT.TOS $ 4687 w, ; immediate
: COMP not.tos both ;
: NSBITS ( value -- num-significant-bits-plus-1-sign-bit )
dup 0< if comp then dup
if ( exception: return 0 if 0 )
0 30 -do dup i bit-set? if drop i 2+ leave then 1 -loop
then ;
\ OR magnitudes of array of n cells starting at addr
: OR.ABS.ARRAY ( addr ncells -- or-magnitude-bits-of-array )
0 -rot 0 DO dup>r @ dup 0< if comp then or r> cell+ loop drop ;
: ASHIFT.ARRAY ( addr ncells nbits -- , shift ncells at addr by nbits )
?DUP IF -rot 0 DO 2dup dup>r @ swap ashift r> ! cell+ LOOP THEN
2drop ;