Google Answers Logo
View Question
 
Q: Programing in c and ASM ( No Answer,   0 Comments )
Question  
Subject: Programing in c and ASM
Category: Computers > Programming
Asked by: mott85-ga
List Price: $20.00
Posted: 24 Apr 2005 09:11 PDT
Expires: 26 Apr 2005 22:18 PDT
Question ID: 513503
can nayone please convert this c function into ASM for me. i just need
this function in ASM code very important
int binomial (int n, int r)
{
if (r < 0 || r > n || n < 1 )
return 0;
if (n==1)
return 1;
else
return binomial (n - 1, r) + binomial (n - 1);

Request for Question Clarification by andyt-ga on 24 Apr 2005 09:51 PDT
Hi mott85, is it ok if I use a program to generate the asm?  I could
do it for PowerPC or Solaris Assembly.

Clarification of Question by mott85-ga on 24 Apr 2005 10:23 PDT
for solaris please also would you know how to call that asm from a min
function in c if you could do both i can even up the price.

Request for Question Clarification by andyt-ga on 24 Apr 2005 17:35 PDT
I'm not sure what you mean about calling from a min function.  Could
you post the code in c that you want converted to asm?

Clarification of Question by mott85-ga on 25 Apr 2005 09:22 PDT
My apologies i had a typo this is the c function i need converted.
Howver i need to be able to call this asm function from the main
function in c (inlining) so i really need 2 things
1. this function converted to ASM
int binomial (int n, int r)
{
if (r < 0 || r > n || n < 1 )
return 0;
if (n==1)
return 1;
else
return binomial (n - 1, r) + binomial (n - 1);


2. Call this newly converted function from main function in a c program
Thanks

Request for Question Clarification by andyt-ga on 25 Apr 2005 10:04 PDT
I tried running your program, and got a compile error (because the
binomial function call on the last line has 1, not 2 args).

Should your last line really be:
return binomial (n - 1, r) + binomial (n - 1, r);
?

Clarification of Question by mott85-ga on 25 Apr 2005 22:11 PDT
Yes that would be correct.

Clarification of Question by mott85-ga on 26 Apr 2005 22:18 PDT
Probably partailly my fualt for being unclear butr i the time has
passed for helkp on this issue Thanks for trying.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy