[vb_ro] ASM in VB6.0 SP5
- From: "Gabriel-Dumitrel MOSCALU" <gabriel.moscalu@xxxxxxxx>
- To: <vb_ro@xxxxxxxxxxxxx>
- Date: Mon, 23 Feb 2004 19:29:13 +0200
Salutare,
Stie cineva daca se poate si daca da, cum pot face sa introduc o secventa ASM
intr-o functie VB6.0?
Mai exact, am urmatorul cod ASM (ca sa obtin detalii despre CPU):
pushfd ; save EFLAGS to stack.
pop eax ; store EFLAGS in eax.
mov edx, eax ; save in ebx for testing later.
xor eax, 0200000h ; switch bit 21.
push eax ; copy "changed" value to stack.
popfd ; save "changed" eax to EFLAGS.
pushfd
pop eax
xor eax, edx ; See if bit changeable.
jnz short cpuid_present ; if so, mark
mov eax, -1 ; CPUID not present - disable its
usage
jmp no_features
cpuid_present:
mov eax, 0 ; CPUID capable CPU - enable
its usage.
no_features:
mov CPUIDPresent, eax ; Save the value in eax to a variable.
Va multumesc anticipat,
Cu respect/Cordialement/Best regards/Mit freundlichen Grüssen/Com os melhores
cumprimentos/Le saluda atentamente
Gabriel Moscalu
Support Expert
Ferma S.A.
www.ferma.fr
+33 (0)1 46 12 58 80
Other related posts: