[comp.os.vms] Inline macro code in C

JMS@MRSVAX.MIS.ARIZONA.EDU (Profitability is the sovereign of the enterprise, Drucker) (09/20/87)

UCS_KAS@SHSU writes:
>#if vax_asm
>            asm("insv   4(ap),r11,r10,(r9)");
>#else
>    I never realized this was possible in VAX C and I needed to do exactly
>this sort of thing. Needless to say I couldn't make it work and I couldn't
>find any reference to the feature in the C manuals.

On page 1-21 of the *new* C manual, "The asm call is not supported
by VAX C."  The fragment you have above is designed to run under
VAX Unix, not VAX/VMS.

The Unix compiler for C normally does support the asm call.  This
is a bad idea, for all sorts of reasons.  Questions of compiler
optimization, variable naming, and portability are all important
when trying to do in-line assembly language.  

+-------------------------------+
| Joel M Snyder                 |            BITNET: jms@arizmis.BITNET
| Univ of Arizona Dep't of MIS  |          Internet: jms@mrsvax.mis.arizona.edu
| Tucson, Arizona 85721         |   Pseudo-PhoneNET: (602) 621-2748
+-------------------------------+              ICBM: 32 13 N / 110 58 W
(I have gotten into trouble too many times to put any faith in disclaimers)
"There's nothing here that an overdose of Seconal won't cure."