Portable \"asm\" (Was: The D Programming Language)

Bob Babcock PEPRBV%CFAAMP.BITNET at husc6.harvard.EDU
Sun Mar 6 15:04:42 AEST 1988


>>Now, if I were implementing an "asm" construct, I'd probably do
>>something cheesy like
#asm
    Assembly code here...
#endasm

This is precisely the syntax used by the Microware OS-9/68K C compiler,
and I like it much better than the asm(...) construct which is more
to type and looks like a function call.  I use this construct to patch
in entry and exit code for an interrupt handler so that most of it can
be written in C, and I don't expect it to be portable.

Question: could a compiler which accepts this syntax be conforming under
the new ANSI standard?  If not, how about
     #pragma asm
     #pragma endasm?



More information about the Comp.lang.c mailing list