Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

Discussion Groups | MSP430 | Floating Point Package

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

Floating Point Package - Peter Grey - Sep 14 5:48:30 2008

Has any one done anything with the FPP from TI?

I am having a problem with it I get the error message "failed to
write memory at 0x300"
My code is below
TIA
Peter
#include "msp430x13x.h"
SYSID EQU 0200h
ADDRESS EQU 0254h
BIT_COUNTER EQU 0256h
FLAG EQU 0258h
MP1 EQU 025Ah
MP2 EQU 025Ch
MP3 EQU 025Eh
MP4 EQU 0260h
RESULTHHH EQU 0262h
RESULTHH EQU 0264h
RESULTH EQU 0266h
RESULTL EQU 0268h

#define COUNTER R13
DOUBLE set 0
SW_UFLOW set 0
SW_RND set 1
HW_MPY set 1
NUMBER set 0220h

#include "c:\fpp\fppdef4.s43"
#include "c:\fpp\fpp04.s43"
#include "c:\fpp\cnv04.s43"
PI .FLOAT 3.1415926535
MULTI .FLOAT 1.5
;------------------------------------------------------------------------------
ORG 0E000h ; Program Start
;------------------------------------------------------------------------------
Reset

M1 mov.w #0300h,SP ; Initialize stackpointer
; call #Setup
call #FLT_SAV
sub #6,SP
mov #MULTI,RPRES
Mainloop mov #PI,RPARG
call #FLT_MUL
jn ERR_HND
pop &230h
pop &232h
call #FLT_REC
Loop nop
jmp Loop
ERR_HND nop
jmp ERR_HND
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )


RES: Floating Point Package - Augusto Einsfeldt - Sep 14 9:34:59 2008

The *.S43 files are code, not definition (like a .H file). So, you must
include those after an ORG statement to tell the compiler where to put that
code.

You, also, did not set the interrupt/reset vectors (assuming you shown the
whole code).

-Augusto

-----Mensagem original-----
De: m...@yahoogroups.com [mailto:m...@yahoogroups.com] Em nome de Peter
Grey
Enviada em: domingo, 14 de setembro de 2008 06:48
Para: m...@yahoogroups.com
Assunto: [msp430] Floating Point Package

Has any one done anything with the FPP from TI?

I am having a problem with it I get the error message "failed to
write memory at 0x300"
My code is below

TIA

Peter
#include "msp430x13x.h"
SYSID EQU 0200h
ADDRESS EQU 0254h
BIT_COUNTER EQU 0256h
FLAG EQU 0258h
MP1 EQU 025Ah
MP2 EQU 025Ch
MP3 EQU 025Eh
MP4 EQU 0260h
RESULTHHH EQU 0262h
RESULTHH EQU 0264h
RESULTH EQU 0266h
RESULTL EQU 0268h

#define COUNTER R13
DOUBLE set 0
SW_UFLOW set 0
SW_RND set 1
HW_MPY set 1
NUMBER set 0220h

#include "c:\fpp\fppdef4.s43"
#include "c:\fpp\fpp04.s43"
#include "c:\fpp\cnv04.s43"
PI .FLOAT 3.1415926535
MULTI .FLOAT 1.5
;----------------------------------------------------------
ORG 0E000h ; Program Start
;----------------------------------------------------------
Reset

M1 mov.w #0300h,SP ; Initialize stackpointer
; call #Setup
call #FLT_SAV
sub #6,SP
mov #MULTI,RPRES
Mainloop mov #PI,RPARG
call #FLT_MUL
jn ERR_HND
pop &230h
pop &232h
call #FLT_REC
Loop nop
jmp Loop
ERR_HND nop
jmp ERR_HND

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

RES: Floating Point Package - Augusto Einsfeldt - Sep 14 10:01:16 2008

BTW, the FPP package works well with 48bit format float and demands some
time debugging some functions in 32bit format.

The instructions "mov #MULTI,RPRES" and "Mainloop mov #PI,RPARG" shall not
work the way you expect. FLOAT directive means a 3 word number in IAR
Assembler and a 2 word number in TI Assembler. Either way, those
instructions moves only the first word of the constants (unless I am
mistaken and the compiler includes MOV instructions when detect a multi-word
value. but I did not find this in the compiler manual). Of course you can
make a MACRO to do this.

-Augusto

-----Mensagem original-----
De: m...@yahoogroups.com [mailto:m...@yahoogroups.com] Em nome de
Augusto Einsfeldt
Enviada em: domingo, 14 de setembro de 2008 10:35
Para: m...@yahoogroups.com
Assunto: RES: [msp430] Floating Point Package

The *.S43 files are code, not definition (like a .H file). So, you must
include those after an ORG statement to tell the compiler where to put that
code.

You, also, did not set the interrupt/reset vectors (assuming you shown the
whole code).

-Augusto

-----Mensagem original-----
De: msp430@yahoogroups. com
[mailto:msp430@yahoogroups. com] Em nome
de Peter
Grey
Enviada em: domingo, 14 de setembro de 2008 06:48
Para: msp430@yahoogroups. com
Assunto: [msp430] Floating Point Package

Has any one done anything with the FPP from TI?

I am having a problem with it I get the error message "failed to
write memory at 0x300"
My code is below

TIA

Peter
#include "msp430x13x.h"
SYSID EQU 0200h
ADDRESS EQU 0254h
BIT_COUNTER EQU 0256h
FLAG EQU 0258h
MP1 EQU 025Ah
MP2 EQU 025Ch
MP3 EQU 025Eh
MP4 EQU 0260h
RESULTHHH EQU 0262h
RESULTHH EQU 0264h
RESULTH EQU 0266h
RESULTL EQU 0268h

#define COUNTER R13
DOUBLE set 0
SW_UFLOW set 0
SW_RND set 1
HW_MPY set 1
NUMBER set 0220h

#include "c:\fpp\fppdef4.s43"
#include "c:\fpp\fpp04.s43"
#include "c:\fpp\cnv04.s43"
PI .FLOAT 3.1415926535
MULTI .FLOAT 1.5
;----------------------------------------------------------
ORG 0E000h ; Program Start
;----------------------------------------------------------
Reset

M1 mov.w #0300h,SP ; Initialize stackpointer
; call #Setup
call #FLT_SAV
sub #6,SP
mov #MULTI,RPRES
Mainloop mov #PI,RPARG
call #FLT_MUL
jn ERR_HND
pop &230h
pop &232h
call #FLT_REC
Loop nop
jmp Loop
ERR_HND nop
jmp ERR_HND

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: RES: Floating Point Package - Peter Grey - Sep 15 6:48:23 2008

At 09:34 PM 14/09/2008, you wrote:

Augusto,

I have never used assembler directives or had more than 1 program at
a time. I am sure I am doing something really stupid but cannot see
it. The program I copied from the examples in the Floating Point
Package in slaa024.pdf. I did have the interrupt/reset vectors in
place but wanted to minimize what I sent. I have included everything below.
Sorry for the excess sent.

Any help is appreciated. I gather from your next email that I am
better off using the 48 bit version even though I do not need it??

Cheers
Peter

>The *.S43 files are code, not definition (like a .H file). So, you must
>include those after an ORG statement to tell the compiler where to put that
>code.
>
>You, also, did not set the interrupt/reset vectors (assuming you shown the
>whole code).
>
>-Augusto
>
>-----Mensagem original-----
>De: m...@yahoogroups.com [mailto:m...@yahoogroups.com] Em nome de Peter
>Grey
>Enviada em: domingo, 14 de setembro de 2008 06:48
>Para: m...@yahoogroups.com
>Assunto: [msp430] Floating Point Package
>
>Has any one done anything with the FPP from TI?
>
>I am having a problem with it I get the error message "failed to
>write memory at 0x300"
>My code is below
>
>TIA
>
>Peter
>#include "msp430x13x.h"
>SYSID EQU 0200h
>ADDRESS EQU 0254h
>BIT_COUNTER EQU 0256h
>FLAG EQU 0258h
>MP1 EQU 025Ah
>MP2 EQU 025Ch
>MP3 EQU 025Eh
>MP4 EQU 0260h
>RESULTHHH EQU 0262h
>RESULTHH EQU 0264h
>RESULTH EQU 0266h
>RESULTL EQU 0268h
>
>#define COUNTER R13
>DOUBLE set 0
>SW_UFLOW set 0
>SW_RND set 1
>HW_MPY set 1
>NUMBER set 0220h
>
>#include "c:\fpp\fppdef4.s43"
>#include "c:\fpp\fpp04.s43"
>#include "c:\fpp\cnv04.s43"
>PI .FLOAT 3.1415926535
>MULTI .FLOAT 1.5
>;----------------------------------------------------------
>ORG 0E000h ; Program Start
>;----------------------------------------------------------
>Reset
>
>M1 mov.w #0300h,SP ; Initialize stackpointer
>; call #Setup
>call #FLT_SAV
>sub #6,SP
>mov #MULTI,RPRES
>Mainloop mov #PI,RPARG
>call #FLT_MUL
>jn ERR_HND
>pop &230h
>pop &232h
>call #FLT_REC
>Loop nop
>jmp Loop
>ERR_HND nop
>jmp ERR_HND
>
>[Non-text portions of this message have been removed]
>------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: RES: Floating Point Package - Peter Grey - Sep 15 6:49:43 2008

At 09:34 PM 14/09/2008, you wrote:
Sorry, I forgot the code

******************************************************************************
#include "msp430x13x.h"
SYSID EQU 0200h ;WORD FOR SYSTEM ID(HIGH)
ADDRESS EQU 0254h
BIT_COUNTER EQU 0256h
FLAG EQU 0258h
MP1 EQU 025Ah
MP2 EQU 025Ch
MP3 EQU 025Eh
MP4 EQU 0260h
RESULTHHH EQU 0262h
RESULTHH EQU 0264h
RESULTH EQU 0266h
RESULTL EQU 0268h

#define COUNTER R13
DOUBLE set 0
SW_UFLOW set 0
SW_RND set 1
HW_MPY set 1
NUMBER set 0220h

;
PI .FLOAT 3.1415926535
MULTI .FLOAT 1.5
;------------------------------------------------------------------------------
ORG 0E000h ; Program Start
;------------------------------------------------------------------------------
Reset

M1 mov.w #0300h,SP ; Initialize stackpointer
; call #Setup
call #FLT_SAV
sub #6,SP
mov #MULTI,RPRES
Mainloop mov #PI,RPARG
call #FLT_MUL
jn ERR_HND
pop &230h
pop &232h
call #FLT_REC
Loop nop
jmp Loop
ERR_HND nop
jmp ERR_HND
;i use this to test 32x32 bit multiplies
;the multiplicand is in MP3 & MP4. It shifts left into MP2,MP1
;The multiplier is in R4R5
;The result is in RESULTHHH,RESULTHH,RESULTH,RESULTL.
clr BIT_COUNTER
clr RESULTHHH
clr RESULTHH
clr RESULTH
clr RESULTL
clr MP1
clr MP2
ST1 bit #01h,R5 ;is the multiplier low bit set?
jnz ST2 ;yes
ST3 inc BIT_COUNTER
cmp #32,BIT_COUNTER
jeq Loop
ST4 rla MP4 ;no, shift left the
multiplicand MP1-4
rlc MP3
rlc MP2
rlc MP1
rra R4
rrc R5
jmp ST1
ST2 add MP4,RESULTL ;add to result
adc RESULTH
adc RESULTHH
adc RESULTHHH
add MP3,RESULTH
adc RESULTHH
adc RESULTHH
add MP2,RESULTHH
adc RESULTHHH
add MP1,RESULTHHH
inc BIT_COUNTER
cmp #32,BIT_COUNTER ;done 32 bits?
jne ST4 ;no
Loopa nop
jmp Loopa

;---------------------------------------------------------------------------------
Setup

SetupWDT1 mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop Watchdog Timer
; bic #OSCOFF,SR ;turn on osc
; bis.b #XTS,&BCSCTL1 ;HF mode
bic.b #XT2OFF,&BCSCTL1 ;use XT2
L1 bic.b #OFIFG,&IFG1
mov #0FFh,R15 ;Delay
L2 dec R15
jnz L2
bit.b #OFIFG,&IFG1;retest OFIFG
jnz L1
; bis.b #SELM1+SELS,&BCSCTL2 ;select LFXT1CLK & SMCLK
& MCLK from this
bis.b #DIVA1+DIVA0,&BCSCTL1 ;aclk/8
SetupUART0 bis.b #UTXE0+URXE0,&ME1 ;enable TXD/RXD
bis.b #CHAR,&UCTL0 ;8 bit data
mov.b #SSEL1,&UTCTL0 ;smclk
;baud rate 4800 - 4MHz/4800=833.33 ($341 )
mov.b #03h,&UBR10
mov.b #041h,&UBR00
;modulation
mov.b #024h,&UMCTL0
bic.b #SWRST,&UCTL0 ;initialize uart
; bis.b #URXIE0,&IE1 ;enable USART0
receive (for the future)
;SetupClock mov.b #070h,&BCSCTL1 ;HF and ACLK divided
by 8 (0.5MHz)
; mov.b #0E0h,&DCOCTL
mov.b #SELM1+SELS,&BCSCTL2 ;MCLK/SMCLK from XT2 &
div by 8

SetupP1 mov.b #0EFh,&P1DIR ; All P1.x outputs,
clr.b &P1OUT ; SET LOW
; bis.b #010h,P1SEL ;to view smclk
SetupP2
mov.b #040h,&P2DIR ;
clr.b &P2OUT ;

; bis.b #01h,&P2SEL ;ACLK
SetupP3 mov.b #0AFh,&P3DIR
clr.b &P3OUT
bis.b #0F0h,&P3SEL ;set up for uart operations
SetupP4 mov.b #0FFh,&P4DIR
clr.b &P4OUT
SetupP5 mov.b #0FFh,&P5DIR
clr.b &P5OUT
; bis.b #030h,&P5SEL ;SMCLK
SetupP6 mov.b #0FCh,&P6DIR ;A0, A1 analog inputs
clr.b &P6OUT
bis.b #03h,&P6SEL ; Enable A/D channel A0 & A1(RSSI)
;
bis #ENC,&ADC12CTL0 ; Enable conversions
mov #MC1+TASSEL1+ID0+ID1,&TACTL ;SMCLK,
clr.b ADDRESS
; call #Read_eeprom ;get teh LRID and
SYSID, returns in R15
;I need to convert this to ascii now. The sysid is in teh upper byte,
lrid in lower byte

; call #Bin_manchester ;converts lower byte
to manchester in R14
; mov R14,THIS_SYSID ;
; swpb R15
;call #Bin_manchester
; mov R14,THIS_LRID
clr COUNTER
EINT ;ENABLE INTS
ret
;----------------------------------------------------
ORG 0E200h
#include "c:\fpp\fppdef4.s43"
;---------------------------------------------------------------------
ORG 0E600h
#include "c:\fpp\fpp.s43"
;-----------------------------------------------------
ORG 0EA00h
#include "c:\fpp\cnv.s43"
;------------------------------------------------------------------------
Wdt_isr nop ;for testing only
;i have to put the clock routine in here as the the timerA/CCR2 interrupts
;mean that the RTC will lose seconds when I do a scan
bic #LPM3,0(SP) ;clear the SR LPM3 bits on TOS

reti
;---------------------------------------------------------------------------
;------------------------------------------------------------------------------
TA0_ISR ; RXTXData Buffer holds UART Data
;------------------------------------------------------------------------------
RX_Next reti ;
;----------------------------------------------------------

Port2int
reti
;-----------------------------------------------------------------------------
TimerAint
NOP
NOP

Tim2end RETI
;-------------------------------------------------------
Port1int bic #0030h,&TACTL ;turn off timer
; dint
reti
;-----------------------------------------------------------------------------
TimerBint

NOP
NOP
ADD &TBIV,PC ;jump to the relevant interrupt
RETI
RETI
RETI
RETI
RETI
RETI
RETI
; INC COUNTH ;HIGH COUNTER
bic #0030h,&TBCTL ;turn off timer

reti
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
Dummy nop

reti
;---------------------------
ADC12
reti

;------------------------------------------------------------------------------
; Interrupt Vectors Used MSP430x133
;------------------------------------------------------------------------------
ORG 0FFE0h
DW Dummy ;FFE0h
DW Port2int ;FFE2h
DW Dummy ;FFE4h
DW Dummy ;FFE6h,
DW Port1int ;FFE8h
DW TimerAint ;FFEAh
DW TA0_ISR ;FFECh
DW ADC12 ;FFEEh
DW Dummy ;FFF0h, TimerA
DW Dummy ;FFF2h,
DW Wdt_isr ;FFF4h, WDT
DW Dummy ;FFF6h, COMP_A
DW TimerBint ;FFF8h
DW Dummy ;FFFAh
DW Dummy ;FFFCh, NMI, OSC fault
DW Reset ;POR, WDT, EXT RESET

;-------------------------------------------------------------------
END
>The *.S43 files are code, not definition (like a .H file). So, you must
>include those after an ORG statement to tell the compiler where to put that
>code.
>
>You, also, did not set the interrupt/reset vectors (assuming you shown the
>whole code).

...snip....
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: Floating Point Package - Anders Lindgren - Sep 15 7:58:55 2008

Peter Grey wrote:

> Has any one done anything with the FPP from TI?

Hi Peter!

I would not recommend using the FPP package from TI. The ones that tool
vendors provide are typically better implemented and comply with the
IEEE 754 floating-point standard. In addition, they work in C using the
"float" and "double" data types.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: Floating Point Package - Peter Grey - Sep 15 8:20:04 2008

At 07:58 PM 15/09/2008, you wrote:

Hi Anders

Thanks for the feedback. Apart from my previous posts I have had
experience with a FPP in a PIC chip and that is it. I also program in
assembler, not C. Having had 2 warnings I guess I should heed
them!! I do not have the time to jump into a 'C' compiler to do
this. Does IAR have a FPP package which can be integrated with assembler?

Thanks for the help

Peter
>Peter Grey wrote:
>
> > Has any one done anything with the FPP from TI?
>
>Hi Peter!
>
>I would not recommend using the FPP package from TI. The ones that tool
>vendors provide are typically better implemented and comply with the
>IEEE 754 floating-point standard. In addition, they work in C using the
>"float" and "double" data types.
>
> -- Anders Lindgren, IAR Systems
>--
>Disclaimer: Opinions expressed in this posting are strictly my own and
>not necessarily those of my employer.
>
>------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: Floating Point Package - Anders Lindgren - Sep 15 9:58:26 2008

Peter Grey wrote:
> At 07:58 PM 15/09/2008, you wrote:
>
> Hi Anders
>
> Thanks for the feedback. Apart from my previous posts I have had
> experience with a FPP in a PIC chip and that is it. I also program in
> assembler, not C. Having had 2 warnings I guess I should heed
> them!! I do not have the time to jump into a 'C' compiler to do
> this. Does IAR have a FPP package which can be integrated with assembler?

Yes and no...

The underlying routines can be called from any language. However, the
interface is not published, since we want to be able to change it in
future versions.

This means that you can implement this in two different ways:

1) Effective version: Reverse engineer the internal calling-convention
and call the low-level routines directly. (Rule of thumb: imitate
whatever the compiler does.)

2) Safe version: Write stub routines in C, each simply performing a
floating-point operation. You can then call the stubs from assembler
using the published C calling-convention. For example:

float my_mul32(float x, float y) { return x * y; }

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

RES: Floating Point Package - Augusto Einsfeldt - Sep 15 10:18:32 2008

Hi Peter,

I had no time to test your code. It seems ok now (with the FPP package
included in an ORG). In fact, you don't need to put in an especial location.
You can just include it along with the code and before the vector's table.

The error you posted before seems that your tool is trying to write in the
address 0x0300 at the target when you want to download it to the MSP430.

I cannot see where in the code it says something should be in this address.
If you still having this error then I would recommend to check included
files and other possible setup in the tool's options. Maybe you have a wrong
processor set there.

Regarding the FPP what I have found is TI did test it in 48bit format and
when in 32bit some parts of the code don't work. It is only in several
functions. I cannot recall where (I made the implementation about 3 years
ago and made no special remarks in the code).

I am using the 32 bit format and the whole FPP package works very well.

Below is an example of code to call the multiply function. I did use R9, R10
and R11 to point the arguments and result.

In case you still have problems contact me in my private email (aee at
terra.com.br).

Best regards,

Augusto

; RPARG enters as a pointer in R9

; RPRES enters as a pointer in R10

mat_f_mult call #flt_sav ; save regsiters

sub #4,sp ; allocation of 2 words for result

mov r10,R5

call #flt_mul

pop r9

mov r9,rascflt0

pop r9

mov r9,rascflt1

call #flt_rec ; get all registers back, including R5

jn f_math_error ; error handling

mov rascflt0,0(r11)

mov rascflt1,2(r11)

... in this case I did save the results in 0..2(R11) ..

... below this point you put the rest of your code

-----Mensagem original-----
De: m...@yahoogroups.com [mailto:m...@yahoogroups.com] Em nome de Peter
Grey
Enviada em: segunda-feira, 15 de setembro de 2008 09:20
Para: m...@yahoogroups.com
Assunto: Re: [msp430] Floating Point Package

At 07:58 PM 15/09/2008, you wrote:

Hi Anders

Thanks for the feedback. Apart from my previous posts I have had
experience with a FPP in a PIC chip and that is it. I also program in
assembler, not C. Having had 2 warnings I guess I should heed
them!! I do not have the time to jump into a 'C' compiler to do
this. Does IAR have a FPP package which can be integrated with assembler?

Thanks for the help

Peter
>Peter Grey wrote:
>
> > Has any one done anything with the FPP from TI?
>
>Hi Peter!
>
>I would not recommend using the FPP package from TI. The ones that tool
>vendors provide are typically better implemented and comply with the
>IEEE 754 floating-point standard. In addition, they work in C using the
>"float" and "double" data types.
>
> -- Anders Lindgren, IAR Systems
>--
>Disclaimer: Opinions expressed in this posting are strictly my own and
>not necessarily those of my employer.
>
>------------------------------------
>
>> egroups.com



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: RES: Floating Point Package - Peter Grey - Sep 15 20:49:50 2008

At 10:17 PM 15/09/2008, you wrote:

Thanks Augusto and Anders for help with the FPP. At this stage I will
carry on with my integers and convert to a form of IEEE-754 which is
required by my application.

Peter
>Hi Peter,
>
>I had no time to test your code. It seems ok now (with the FPP package
>included in an ORG). In fact, you don't need to put in an especial location.
>You can just include it along with the code and before the vector's table.
>
>The error you posted before seems that your tool is trying to write in the
>address 0x0300 at the target when you want to download it to the MSP430.
>
>I cannot see where in the code it says something should be in this address.
>If you still having this error then I would recommend to check included
>files and other possible setup in the tool's options. Maybe you have a wrong
>processor set there.
>
>Regarding the FPP what I have found is TI did test it in 48bit format and
>when in 32bit some parts of the code don't work. It is only in several
>functions. I cannot recall where (I made the implementation about 3 years
>ago and made no special remarks in the code).
>
>I am using the 32 bit format and the whole FPP package works very well.
>
>Below is an example of code to call the multiply function. I did use R9, R10
>and R11 to point the arguments and result.
>
>In case you still have problems contact me in my private email (aee at
>terra.com.br).
>
>Best regards,
>
>Augusto
>
>; RPARG enters as a pointer in R9
>
>; RPRES enters as a pointer in R10
>
>mat_f_mult call #flt_sav ; save regsiters
>
> sub #4,sp ; allocation of 2 words for result
>
> mov r10,R5
>
> call #flt_mul
>
> pop r9
>
> mov r9,rascflt0
>
> pop r9
>
> mov r9,rascflt1
>
> call #flt_rec ; get all registers back, including R5
>
> jn f_math_error ; error handling
>
> mov rascflt0,0(r11)
>
> mov rascflt1,2(r11)
>
> ... in this case I did save the results in 0..2(R11) ..
>
>... below this point you put the rest of your code
>
>-----Mensagem original-----
>De: m...@yahoogroups.com [mailto:m...@yahoogroups.com] Em nome de Peter
>Grey
>Enviada em: segunda-feira, 15 de setembro de 2008 09:20
>Para: m...@yahoogroups.com
>Assunto: Re: [msp430] Floating Point Package
>
>At 07:58 PM 15/09/2008, you wrote:
>
>Hi Anders
>
>Thanks for the feedback. Apart from my previous posts I have had
>experience with a FPP in a PIC chip and that is it. I also program in
>assembler, not C. Having had 2 warnings I guess I should heed
>them!! I do not have the time to jump into a 'C' compiler to do
>this. Does IAR have a FPP package which can be integrated with assembler?
>
>Thanks for the help
>
>Peter
> >Peter Grey wrote:
> >
> > > Has any one done anything with the FPP from TI?
> >
> >Hi Peter!
> >
> >I would not recommend using the FPP package from TI. The ones that tool
> >vendors provide are typically better implemented and comply with the
> >IEEE 754 floating-point standard. In addition, they work in C using the
> >"float" and "double" data types.
> >
> > -- Anders Lindgren, IAR Systems
> >--
> >Disclaimer: Opinions expressed in this posting are strictly my own and
> >not necessarily those of my employer.
> >
> >
> >
> >------------------------------------
> >
> >> egroups.com
> >
> >



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )