Hi
I need simple,ready to compile, example with 'add' 'mul'
'sub' in
Assembler, for two or more floating, signed numbers. I use msp430f149.
I'd like convert float result to binary. Will I use only CNV_FL_BIN??
If anubody have this example please send mi to my e-mail makon@mako...
needy people should ask the Goverment for help :)
Alex
----- Original Message -----
From: "makonmk" <makon@mako...>
To: <msp430@msp4...>
Sent: Tuesday, December 27, 2005 2:36 AM
Subject: [msp430] Floating Point numbers, Assembler
> Hi
> I need simple,ready to compile, example with 'add'
'mul' 'sub' in
> Assembler, for two or more floating, signed numbers. I use msp430f149.
> I'd like convert float result to binary. Will I use only CNV_FL_BIN??
>
> If anubody have this example please send mi to my e-mail makon@mako...
>
>
>
>
>
>
>
>
> .
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
Reply by Anders Lindgren●January 2, 20062006-01-02
> I need simple,ready to compile, example with 'add'
'mul' 'sub' in
> Assembler, for two or more floating, signed numbers. I use msp430f149.
> I'd like convert float result to binary. Will I use only CNV_FL_BIN??
Most development tools comes with a set of floating-point
implementations, you're better off using the one that is provided by
your tool than to write your own.
However, the actual floating-point routines are considered "internal",
which means that you shouldn't call them directly from assembler.
However, you can define a set of stub functions in C and call them, e.g.
// In C:
double add_double(double x, double y)
{
return x + y;
}
// In assembler
EXTERN add_double
// Pass parameters to the C function (note: calling-convention
// could vary between tools).
MOV #xxx, R8
....
MOV #zzz, R15
CALL add_double
-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Signal Processing Engineer Seeking a DSP Engineer to tackle complex technical challenges. Requires expertise in DSP algorithms, EW, anti-jam, and datalink vulnerability. Qualifications: Bachelor's degree, Secret Clearance, and proficiency in waveform modulation, LPD waveforms, signal detection, MATLAB, algorithm development, RF, data links, and EW systems. The position is on-site in Huntsville, AL and can support candidates at 3+ or 10+ years of experience.