Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!sdcsvax!ucbvax!MRSVAX.MIS.ARIZONA.EDU!JMS From: JMS@MRSVAX.MIS.ARIZONA.EDU (Profitability is the sovereign of the enterprise, Drucker) Newsgroups: comp.os.vms Subject: RE: Inline macro code in C Message-ID: <870920114229.20600B80061@mrsvax.mis.arizona.edu> Date: Sun, 20-Sep-87 14:42:29 EDT Article-I.D.: mrsvax.870920114229.20600B80061 Posted: Sun Sep 20 14:42:29 1987 Date-Received: Sun, 20-Sep-87 22:59:47 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 24 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."