Hi , I have a practical problem of calling the assembly routines from C code. My C code And Assembly Code are in different files. I am able to execute the inline assembly statements...but not able to call the assebmly functions of different file... i am working for the ADSP-218x series...precisely adsp-2189 kindly guide me asap..... |
|
query.....adsp-218x
Started by ●September 6, 2003
Reply by ●September 6, 20032003-09-06
On Sat, 6 Sep 2003, Sameer wrote: > I have a practical problem of calling the assembly routines from C code. > > My C code And Assembly Code are in different files. I am able to execute the > > inline assembly statements...but not able to call the assebmly functions of > different file... > > i am working for the ADSP-218x series...precisely adsp-2189 > > kindly guide me asap..... Al Clark can help more than I can on this one, but I bet your problem has to do with C specifics which you don't normally see. You need to find out how the compiler passes arguments and make sure your assembler routines do exactly the same thing. In line assembly is different, there is no argument passing. One thing you can do is build your assembler files inside a C called subroutine and then you don't have to worry about how C works. But for the 218x series, I think eliminating C altogether makes more sense. That way you don't have to worry about C overhead at all. Patience, persistence, truth, Dr. mike |
|
Reply by ●September 6, 20032003-09-06
At 04:16 PM 9/6/2003, Mike Rosing wrote: >On Sat, 6 Sep 2003, Sameer wrote: > > > I have a practical problem of calling the assembly routines from C code. > > > > My C code And Assembly Code are in different files. I am able to > execute the > > > > inline assembly statements...but not able to call the assebmly functions of > > different file... > > > > i am working for the ADSP-218x series...precisely adsp-2189 > > > > kindly guide me asap..... > >Al Clark can help more than I can on this one, but I bet your problem >has to do with C specifics which you don't normally see. You need to >find out how the compiler passes arguments and make sure your assembler >routines do exactly the same thing. In line assembly is different, there >is no argument passing. > >One thing you can do is build your assembler files inside a C called >subroutine and then you don't have to worry about how C works. But for >the 218x series, I think eliminating C altogether makes more sense. >That way you don't have to worry about C overhead at all. > >Patience, persistence, truth, >Dr. mike I probably have written as much 218x code as anyone, and I have never written a single line of C for this family. I agree with Mike, avoid C with this processor family. The 21xx is not very C friendly and the assembly language is easy (whicjh you already know since you are trying to call an assembly function). I can't add any thing more than Mike Al Clark Danville Signal Processing, Inc. -------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com |
Reply by ●September 7, 20032003-09-07
>From: "Sameer" <> >To: >CC: >Subject: [adsp] query.....adsp-218x >Date: Sat, 06 Sep 2003 10:25:23 +0530 (IST) > >Hi , > >I have a practical problem of calling the assembly routines from C code. > >My C code And Assembly Code are in different files. I am able to execute >the > >inline assembly statements...but not able to call the assebmly functions of >different file... > >i am working for the ADSP-218x series...precisely adsp-2189 > >kindly guide me asap..... I don't recall having any problems doing this, but it was some time ago. ADI has details in their documentation. What exactly is going wrong? Leon -- Leon Heller, G1HSM Tel: +44 1424 423947 Email: My web page: http://www.geocities.com/leon_heller _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger |
Reply by ●September 7, 20032003-09-07
i got the solution for the same....actually the LDF file was creating the whole problem, now its been sorted out.... thanx alot for the support... Sameer Leon Heller wrote: > > >>From: "Sameer" <> >>To: >>CC: >>Subject: [adsp] query.....adsp-218x >>Date: Sat, 06 Sep 2003 10:25:23 +0530 (IST) >> >>Hi , >> >>I have a practical problem of calling the assembly routines from C code. >> >>My C code And Assembly Code are in different files. I am able to execute >>the >> >>inline assembly statements...but not able to call the assebmly functions of >>different file... >> >>i am working for the ADSP-218x series...precisely adsp-2189 >> >>kindly guide me asap..... >I don't recall having any problems doing this, but it was some time ago. ADI >has details in their documentation. What exactly is going wrong? > >Leon >-- >Leon Heller, G1HSM Tel: +44 1424 423947 >Email: >My web page: http://www.geocities.com/leon_heller > >_________________________________________________________________ >It's fast, it's easy and it's free. Get MSN Messenger today! >http://www.msn.co.uk/messenger >_____________________________________ >Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. > >_____________________________________ >About this discussion group: > >To Join: Send an email to > >To Post: Send an email to > >To Leave: Send an email to > >Archives: http://groups.yahoo.com/group/adsp > >Other Groups: http://www.dsprelated.com/groups.php3 >">http://docs.yahoo.com/info/terms/ > > |