Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Hi Everybody, Thanks for the answers to my previous question. My question now is about what instruction/command should be used to return to asm from a C function. The program in asm works with SPORT0 and SPORT2 interrupts, and the C function is call using the CALL instruction. Thanks
You really need to read the manual. The manual that contains all of the answers to your questions is the "C/C++ Compiler and Library Manual --- In a...@yahoogroups.com, aova2@... wrote: > > Hi Everybody, > Thanks for the answers to my previous question. > My question now is about what instruction/command should be used to return to asm from a C function. The program in asm works with SPORT0 and SPORT2 interrupts, and the C function is call using the CALL instruction. > > Thanks >
Hi again a...@hotmail.com schrieb: > Hi Everybody, > Thanks for the answers to my previous question. > My question now is about what instruction/command should be used to return to asm from a C function. The program in asm works with SPORT0 and SPORT2 interrupts, and the C function is call using the CALL instruction. First, you should call the C function correctly. IIRC there's a macro ccall, which sets up the stack frame and uses the special processor command cjump (on 21161, but that should be the same on 2126x). You cannot change the way, C returns from a function. That's done by the C compiler. BTW when writing ASM functions to be called from C, use the macros leaf_entry and leaf_exit. You should find them in VisualDSP's help (along with above ccall, and some more asm macros like puts and gets for using the C stack). Regards Norbert -- Dr. Norbert Langermann - Softwareentwickler RADIODATA Kommunikationstechnik GmbH n...@radiodata.biz OpenPGP-Key: 0x51431418