Announcement

Collapse
No announcement yet.

Verify MMX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Verify MMX

    Could someone with an old machine please verify that this code returns ZERO if MMX is not present.

    Code:
    #COMPILE EXE "VerifyMMX.exe"
    #REGISTER NONE   
    #DIM ALL
    
    
    '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤' 
    FUNCTION VerifyMMX() AS LONG
    
      !  mov      eax,  1
      !  cpuid
      !  XOR      eax,  eax
      !  test     edx,  &h800000       ' bit 23
      !  setnz    al
      !  mov      FUNCTION, eax
    
    END FUNCTION
     
    
             
    '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤'
    FUNCTION PBMAIN( )
    
        MSGBOX STR$(VerifyMMX),64,"VerifyMMX"               
    
    END FUNCTION                                                                    
    
    '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤'
    Last edited by Mike Trader; 10 Oct 2007, 05:35 AM.

  • #2
    Sorry Mike, I don't have an old pc at hand here, but maybe this also helps:

    PowerBASIC and related source code. Please do not post questions or discussions, just source code.


    Kind regards
    Eddy

    Comment


    • #3
      Originally posted by Mike Trader View Post
      Could someone with an old machine please verify that this code returns ZERO if MMX is not present.
      I just picked an old machine from my scrap collection - equipped with a Pentium S 100MHz (the one in the ceramic case), and, luckily, also with Win95B.

      This is the result of VerifyMMX:


      Cheers
      Albert
      „Let the machine do the dirty work.“
      The Elements of Programming Style, Brian W. Kernighan, P. J. Plauger 1978

      Comment


      • #4
        Thats a ZERO.

        Thx Albert

        Comment

        Working...
        X