|
|
View previous topic :: View next topic |
Author |
Message |
future
Joined: 14 May 2004 Posts: 330
|
Does anyone have inline functions for 32/16,16/8,16*16,16*8? |
Posted: Sat Jul 24, 2004 9:14 pm |
|
|
I am looking for some routines to do these operations, plus any other you have.
I ask because I want speed in my code and dont know much asm.
the code I want to start with is..
(int16)A=208335*(int8)B/(int16)C;
The generated code is big with a lot of file register moves (that is what I want to avoid by using inline code).
Edited: A is 16bit.
Last edited by future on Sat Jul 24, 2004 11:57 pm; edited 1 time in total |
|
|
Guest
|
Re: Does anyone have inline functions for 32/16,16/8,16*16,1 |
Posted: Sat Jul 24, 2004 11:14 pm |
|
|
future wrote: | I am looking for some routines to do these operations, plus any other you have.
I ask because I want speed in my code and dont know much asm.
the code I want to start with is..
(int8)A=208335*(int8)B/(int16)C;
The generated code is big with a lot of file register moves (that is what I want to avoid by using inline code). |
First you cast is wrong.... ! The only value you have is already greater than int16 ! This will have to be int32, unless the end result is guaranteed to be int8 . |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Jul 25, 2004 9:00 am |
|
|
Microchip has app notes with all the asm functions that you require. Do a search on their site for math routines. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|