Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: re: Vax assembler code in C routines. Message-ID: <8806290347.AA07123@ucbvax.Berkeley.EDU> Date: 23 Jun 88 16:48:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 I have a question regarding VAX-C: Can I embed one or more Vax-assembler statements in my C program? If so, how? You can't. Embedding assembler code in an HLL is a hack. Either use an HLL that provides REALLY low-level, totally non-portable support for the hardware (BLISS is the only one I know of that supports EVERYTHING; VAX C has some limited stuff - if I remember right, MTPR/MFPR and the interlocked queue instructions - that you can find out about if you read the VAXELN listings, but it's not really supported except for the VAXELN developers), or call an assembler subroutine. For the particular case you give (uses of BBSSI and BBCCI), the assembler subroutines already exist (LIB$BBxxI). In most cases, the difference in performance isn't going to be noticeable. In the rare cases where it is, you may want to move a larger chunk of code into the assembler routine. This might be worth it anyway, if a couple of micro- seconds REALLY matter to you; VAX C generates pretty good code, but a skilled "code bummer" can usually beat it if he tries hard enough. -- Jerry