Dose VC++ 5.0 inline assembler support CPUID instruction? 
Author Message
 Dose VC++ 5.0 inline assembler support CPUID instruction?

No, the inline assembler doesn't know CPUID.

Instead, use this

m{
                  mov eax, 1
                  __emit 0Fh  ; Opcode for CPUID
                  __emit A2h  ;
                    :
                    :
       }  

Olivier


Hi!!
    I am used Microsoft Developer Studio 97/ Visual C++ 5.0 Enterprise Edition,
and write the inline assembler as follow:
                    :
                    :
         _asm{
                  mov eax, 1
                    CPUID
                    :
                    :
       }
    Why are there an error "error C2400: inline assembler syntax error in 'opcode'; found 'newline' " in CPUID?
    Dosen't  inline assembler support CPUID instruction?

Thanks!

Ming-Dar Kuo



Mon, 05 Jun 2000 03:00:00 GMT  
 Dose VC++ 5.0 inline assembler support CPUID instruction?


   >Newsgroups: microsoft.public.vc.language
   >This is a multi-part message in MIME format.
    1) Please don't use HTML, there are plenty of
       different newsgroup readers that view the
       newsgroups, and as such not everyone of them
       is using Internet Explorer or Netscape Navigator
       to read their newsgroups.  In fact, I'm using NetTamer
       for DOS.  Just as it wouldn't look pretty on your screen
       to use line drawing characters like ?? It's not pretty
       to see a bunch of <BODY> etc. tags  ?
   >--------------11274E958FB5728F475E5E8D
   >--------------ACCFFC2255FDA8DE67627323
   >Hi!!
   >I am used Microsoft Developer Studio 97/ Visual C++ 5.0 Enterprise
   >Edition,
   >and write the inline assembler as follow:
   >:
   >:
   >_asm{
   >mov eax, 1
   >CPUID
   >:
   >:
   >}
   >Why are there an error "error C2400: inline assembler syntax error
   >in 'opcode'; found 'newline' " in CPUID?
   >Dosen't  inline assembler support CPUID instruction?
   If I'm not mistaken, Visual C++ is a 32-bit compiler (with
   optimizations for some 64-bit CPU's) and as such, it didn't support
   the CPUID.  CPUID is an instruction that most 486 chips didn't
   include, and only in the Pentium based chips could you be guaranteed
   to support it. On the 32-bit chips, I think the newest 486slc's and
   other low-powered chips supported it, but the SX's and DX's didn't...

   ><BR><FONT SIZE >&nbsp;&nbsp;&nbsp; I am used Microsoft Developer
   The &nbsp is the one HTML tag that Microsoft Abuses so much....
   Because of all the &nbsp's in this message, your message was 70 lines
   long on my reader.  to further make things worse, it doesn't appear
   as if you used any HTML features (eg. you didn't change color, bold,
   etc. so we have 70 lines vs 10 lines or so with no benifiets.  This
   is why so many people are against HTML readers like Microsoft Outlook
   in the newsgroups.  Some BBS's have to pay long-distance fees to
   download newsgroups, just to provide a service to their local callers
   who can't afford internet service (or who is so far away from any
   major city that they have no local service).  Some people do as I
   once did and convert newsgroups to .QWK packet... In short every time
   someone post using html, they cause millions of people everywhere to
   spend more time downloading (which takes time away from their busy
   schedule, prevents them from answering replies as quickly, etc.) and
   in some case cost them more money.  In fact, some of the smartest
   people prefer living "In the boon-docks", and as such have to call
   long-distance for their newsgroups and mail... If they're paying
   long-distance fees to get their newsgroups, you may not hear a reply
   back from them in a while, and they Just might have the answer to a
   programming problem that's been bugging you for a long time....
   Perhaps one that could end up costing you money on a job later on...
   The really bad part about Open Look is that most users don't know
   Microsoft's sending HTML behind their back...  I've tried it, and
   that's only one reason I don't like Internet Explorer 4.0  The other
   has to do with the fact that it keeps crashing my system that I use
   for my Business, and I can't afford to be installing Windows'95 on a
   daily basis....


Net-Tamer V 1.10.1  - Registered



Tue, 06 Jun 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Does VC.Net support inline assembler code?

2. VC++ 5.0 Inline Assembler Problem

3. VC++ 5.0 Inline Assembler Problem

4. inline assembler and Pentium specific instruction(s)

5. Does VC 5.0 support 32 bit inline asm statements

6. CPUID instruction

7. CPUID instruction in _asm block

8. CPUID and __emit pseudo instruction (Corrected Repost)

9. CPUID instruction

10. Error in using MMX's PSADBW instruction in inline assembly in VC++

11. VC inline assembler doesn't recognize EIP?

12. VC inline assembler doesn't recognize EIP?

 

 
Powered by phpBB® Forum Software