Mega Code Archive

 
Categories / Delphi / Graphic
 

How to check MMX 3DKnow Function is present

Title: How to check MMX / 3DKnow Function is present Question: How can i check, if MMX or 3DKnow is present... Answer: Sorry, i'm german. So i may write bad english but i'll trying that. Do you know how to check if MMX feature is present on your processor?` That's my own procedure and works fine under Windows9x. I haven't tested it under WindowsNT systems..... Function IsMMX:INTEGER; var bMMX:BOOLEAN; BEGIN try; // Prfen ob MMX vorhanden ist bMMX := false; Asm push eax // Register retten / rescure register push ebx push ecx push edx pushfd // Erweiterte Flags holen / catch flags pop eax // In EAX speichern / Store EAX mov ebx,eax // In EBX speichern / Store EBX xor eax,$00200000 // Bit 21 negieren push eax popfd pushfd // Erweiterte Flags holen / receive Extendet Flag pop eax // In EAX speichern / store EAX xor eax,ebx // Wenn sich BIT 21 schreiben lt, ist EAX != 0 / if it can write to 21th bit, EAX is zero. je @NoMMX // Der Befehl CPUID wird nicht untersttzt / cmd is unsupported mov eax,$01 // Feature Flags anfragen / detect feature flags // _emit $0F // $0F, $A2 CPUID Befehl // cmd // _emit $A2 test edx,$800000 // MMX ist vorhanden wenn Bit 23 gesetzt ist // MMX is detected if Bit23 is set. jz @NoMMX mov BYTE ptr[bMMX],1 @NoMMX: pop edx pop ecx pop ebx pop eax END; except; result:=-1; exit; END; result:=1; END; (C) by Badboy of GSG (nagra-syster analog-software coder) (C) the Geramn Software Group, HQ WareZ CourierS T1+, T3+ Badboy Is a OldMemba of German Cracking Group (T-1998) Visit HTTP://FreeTV.CJB.NET