Path: utzoo!attcan!uunet!husc6!uwvax!vanvleck!uwmcsd1!ig!agate!ucbvax!ISUMVS.BITNET!GG.SPY From: GG.SPY@ISUMVS.BITNET ("John Hascall") Newsgroups: comp.os.vms Subject: Re: Re: Vax assembler code in C routines. Message-ID: <8807041448.AA21764@ucbvax.Berkeley.EDU> Date: 1 Jul 88 14:04:57 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32 > Date: Thu, 23 Jun 88 21:18:45 GMT > Sender: INFO-VAX Discussion> From: Yogesh Gupta > Subject: Re: Vax assembler code in C routines. > > I have received a bunch of replies stating that I should just use the LIB$BBSS I > routines. I would, except that I can not make the VAX-C compiler to generate > code (ONE instruction) in-line for this routine. It is not that I need this > routine to be fast, I need to hold the bit for as short a time as possible. > So, the code between LIB$BBSSI and LIB$BBCCI is very small (a few > instructions). Now, if they are routines, then the code between the macro > instructions BBSSI ans BBCCI just doubled! This is what I am trying to avoid. > > Thanks everyone for your replies. Any suggestions (other than "do it all in > macro")? Well, you could always do something truly arcane like, put the code you want to execute (the BBSSI, the middle stuff, the BBCCI) into an array and then put the address of the array into a variable defined as a pointer to a function and call it, something like.... char objcode[] = { 0x00, 0x00, /* .entry rtn,M<> */ 0xE6, 0x00, .... /* BBSSI #0,.... */ : : 0xE7, 0x00, .... /* BBCCI #0,.... */ 0x04}; /* RET */ int *objrtn() = &objcode[0]; dummy = *objrtn();