SpinAsm EXP: Difference between revisions

From PedalPCB Wiki
Jump to navigation Jump to search
(Created page with "==EXP== {| class="wikitable" |+ !Mnemonic !Operation !Instruction coding |- |EXP |C * EXP(ACC) + D |CCCCCCCCCCCCCCCCDDDDDDDDDDD01100 |} ======Description====== EXP will multiply 2^ACC with C and add the constant D to the result. Since ACC (in it’s role as the destination for the EXP instruction) is limited to linear values from 0 to +0.99999988, the EXP instruction is limited to logarithmic ACC values (in it’s role as the source operand for the EXP instruction) ...")
 
No edit summary
Line 18: Line 18:
D is intended to allow the linear ACC to be offset by a constant in the range from –1 to +0.9990234375  
D is intended to allow the linear ACC to be offset by a constant in the range from –1 to +0.9990234375  
{| class="wikitable"
{| class="wikitable"
|+
|+Parameters
!Name
!Name
!Width
!Width

Revision as of 20:54, 6 January 2023

EXP

Mnemonic Operation Instruction coding
EXP C * EXP(ACC) + D CCCCCCCCCCCCCCCCDDDDDDDDDDD01100
Description

EXP will multiply 2^ACC with C and add the constant D to the result.

Since ACC (in it’s role as the destination for the EXP instruction) is limited to linear values from 0 to +0.99999988, the EXP instruction is limited to logarithmic ACC values (in it’s role as the source operand for the EXP instruction)  from –16 to 0. Like the LOG instruction, EXP will treat the ACC content as a S4.19 number. Positive logarithmic ACC values will be clipped to +0.99999988 which is the most positive linear value that can be represented within the accumulator.

D is intended to allow the linear ACC to be offset by a constant in the range from –1 to +0.9990234375

Parameters
Name Width Entry formats, range
C 16 Bit Real (S1.14)

Hex ($0000 ­ $FFFF)

Symbolic

D 11 Bit Real(S.10)

Symbolic

Syntax

EXP C, D

Coding Example
exp 0.8,0