Thread View: comp.dsp
1 messages
1 total messages
Started by Avery Wang
Sat, 05 Sep 1992 16:03
DSP 56001 arccos -- ERRATUM
Author: Avery Wang
Date: Sat, 05 Sep 1992 16:03
Date: Sat, 05 Sep 1992 16:03
44 lines
1811 bytes
1811 bytes
Hi DSP hackers-
Thanks to mlelstv@specklec.mpifr-bonn.mpg.de for pointing out that my posting
was rather nonsense. What happened was that I grabbed the wrong file and
posted that instead of the correct (working and compilable) version of the
arccos macro. Here is the correct version for those who are interested.
=======================================================================
; arccos.asm
; Calculates the arc-cosine of the input to 8 bits.
; The output is between 0 and +127 and is in a
;
; Copyright! February 20,1992
; Free for non-profit usage
;
; Avery Wang
; Ruhr-Uni-Bochum
; Institut fuer Neuroinformatik
; ND03, Postfach 102148
; W-4630 Bochum
; Germany
; avery@neuroinformatik.ruhr-uni-bochum.de or
; awang@isl.stanford.edu
; uses the Sine-ROM and simply does a table lookup.
; input and output are in a
; uses a,b,x0,y0,r6,r7,n7
arccos macro
move #$140,r7 ;offset
move #$40,n7 ;guess
move n7,b
do #7,_arccos_loop
lua (r7)+n7,r6 ;save guess
nop
asr b a,x0 y:(r6),y0 ;make increment smaller, lookup cosine
cmp y0,a b,n7
tlt x0,a r6,r7 ;dummy move, if arg>table value, keep old guess
nop
_arccos_loop
move r7,a
move #$140,y0
sub y0,a ;result is here
endm
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads