Portable "asm" (Was: The D Programming Language)
Dr. T. Andrews
tanner at ki4pv.uucp
Fri Mar 4 10:18:42 AEST 1988
Portable "asm". Right. All the world isn't a 68K, but all machines
have the same instruction set and registers.
Now, if I were implementing an "asm" construct, I'd probably do
something cheesy like
#asm
Assembly code here. Syntax as proper for local assembler.
Be sure to enclose the "#asm" block within local #ifdef or
be prepared for a surprise when you try to port. May not
be available on the compiler for the next machine you need.
#endasm
The local pre-processor (if not part of CC) needs to know how to pass
the "#asm" and "#endasm", of course. Put it on the same list as the
thing that passes "#line" constructs.
--
{allegra clyde!codas decvax!ucf-cs ihnp4!codas killer}!ki4pv!tanner
More information about the Comp.lang.c
mailing list