From: "Brian Gladman" Newsgroups: comp.os.msdos.djgpp Subject: GCC Assembler for VC++ Routine Date: Wed, 30 Dec 1998 18:14:06 -0000 Message-ID: <915041726.15878.0.nnrp-04.c2de6a96@news.demon.co.uk> NNTP-Posting-Host: seven77.demon.co.uk X-NNTP-Posting-Host: seven77.demon.co.uk:194.222.106.150 X-Trace: news.demon.co.uk 915041726 nnrp-04:15878 NO-IDENT seven77.demon.co.uk:194.222.106.150 X-Complaints-To: abuse AT demon DOT net X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Lines: 24 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have been trying to convert the VC++ routine below into an inline one for gcc without success - I can do most of it but I cannot find an equivalent for _emit to get gcc to issue the two bytes 0x0f and 0x31. Any help here would be much appreciated! Brian Gladman cycle counting routine on Pentium II double cycles(void) { unsigned long hi, lo; __asm { _emit 0x0f _emit 0x31 mov lo,eax mov hi,edx } return 4294967296.0 * hi + lo; };