__ASM() and *.s33 to *.C files (continued)

Oct 06, 2003 2 Replies


In news group comp.lang.c in article


> Kev>> snipped-for-privacy@tesco.net wrote:
>> Inlining assembler in a *.c file:- [...]
>> I have abandonned using __asm() it because it only seems to accept
a
> literal string. Trying to pass it an as the manual
>> suggests fails with a syntax error. Also as a last resort I tried
>> this:-
> ( Well "duh" - there isn't a runtime assembler included in your
> program you know...)
> - Kevin.

It's inlined i.e. not called, static code in rom.



__ASM(unsigned char*) means "I will compile your string here". There's no runtime-anything involved.



- Robin


It almost certainly doesn't. You may *wish* it to mean that, but it won't.

Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.

Oh no! my compiler is "almost certainly" wrong:-

Source

****** int __low_level_init(void) { __asm("nop"); ...

C_Spy output

************ int __low_level_init(void) 04A987 __low_level_init: 04A987 A7 NOP __asm("nop"); ...

If I had a wish, it would be that I could squeeze the spot on my back.

Robin

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required