Colin McGuire

Using Assember Macros in C

Discussion created by Colin McGuire on Mar 5, 2008
Latest reply on Mar 7, 2008 by CompilerGuru
Hey guys,

First of all excuse me if this is in the wrong section, I think I am OK though.

I am writing a C programme on the HCS12 but need to use some assembler in it. I am using the __asm{}.

The assembler I need to input is a bit repetitive, i.e using the same statements again. I understand macros can be used to reduce the code written.

Two questions:

Can I use macros when I am embedding assembler in C and if so where can I put it?
Are there any extra clock cycles added on using macros instead of just writing the code?

Regards,

Colin

Outcomes