Hi,
I have a problem.
I want to insert assembler code into C rutine in IAR compiler.
I prove with #asm and #noasm but no function.
How do I do?
Help me
Ariel
Reply by Anders Lindgren●January 27, 20042004-01-27
"vazquez_ari" <avazquez@avaz...> writes:
> Hi,
> I have a problem.
>
> I want to insert assembler code into C rutine in IAR compiler.
> I prove with #asm and #noasm but no function.
>
> How do I do?
>
> Help me
You can do one of two things:
1) Use inline assembler, for example:
void test()
{
asm("nop");
asm("nop");
asm("nop");
}
Or, even better, write your routine in assembler and call it from C.
There is an entire chapter in the manual that covers this.
-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Reply by Alejandro Gazia●January 27, 20042004-01-27
You can use the _OPC() instruction to insert op codes
directly to memory.
Search for this instruction in the help of IAR. To
quickly know the instruction opcodes use the debug
mode and watch the program listing in assembler wich
will put line in C and assembler the next and so on.
Good luck!
--- vazquez_ari <avazquez@avaz...> escribi
---------------------------------
Hi,
I have a problem.
I want to insert assembler code into C rutine in IAR
compiler.
I prove with #asm and #noasm but no function.
How do I do?
Help me
Ariel
.
---------------------------------
.
------------
Los mejores usados y las m tentadoras
ofertas de 0km est en Yahoo! Autos.
Compro vendtu auto en
http://autos.yahoo.com.ar
Signal Processing Engineer Seeking a DSP Engineer to tackle complex technical challenges. Requires expertise in DSP algorithms, EW, anti-jam, and datalink vulnerability. Qualifications: Bachelor's degree, Secret Clearance, and proficiency in waveform modulation, LPD waveforms, signal detection, MATLAB, algorithm development, RF, data links, and EW systems. The position is on-site in Huntsville, AL and can support candidates at 3+ or 10+ years of experience.