VAX 4.1/4.2 C asm() question
jack at boring.UUCP
jack at boring.UUCP
Tue Jul 2 02:35:17 AEST 1985
This brings me to one of my favorite flames :
NEVER USE ASM() STATEMENTS!!
If you do, do something like
#ifdef FUNNY_MACHINE
asm("movm r3,r4,r5");
#else
while(i-->0) *p++ = *q++;
#endif FUNNY_MACHINE
or, if this is impossible, the least you should do is
#ifdef FUNNY_MACHINE
asm("barf r0");
#else
This instruction should flash all the lights on the console,
turn all the terminals off, and turn on the coffee machine;
#endif FUNNY_MACHINE
How the h*ll should anyone with a different machine now what
your assembly language is like, *even if you're running on a VAX*?
--
Jack Jansen, jack at mcvax.UUCP
The shell is my oyster.
More information about the Comp.unix.wizards
mailing list