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

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

Reply to
robin.pain
Loading thread data ...

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.
Reply to
Hans-Bernhard Broeker

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

Reply to
robin.pain

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.