View Single Post
Old 17 July 2003, 13:39   #2
Tourniquet
Junior Member
 
Tourniquet's Avatar
 
Join Date: Jun 2003
Location: Essex and/or Leeds / UK
Posts: 23
Bah, you didn't state you were running Win95 again.

Client: Included in Windows XP, Windows 2000 Professional, and Windows NT Workstation 4.0.

iirc you need to use the old inline asm (cribbed from MAME):

Code:
CGLOBAL cpuid
cpuid:
	push	ebx
	push	ecx
	push	edx

	mov		eax,0

	;// attempt to change the ID flag
	pushfd
	pop		edx
	xor		edx,1<<21
	push	edx
	popfd

	;// if we can't, they definitely don't have any of these things
	pushfd
	pop		ebx
	xor		edx,ebx
	test	edx,1<<21
	jnz		.Return

	;// use CPUID
	mov		eax,1
	cpuid
	mov		eax, edx

.Return:
	pop		edx
	pop		ecx
	pop		ebx
	ret
Then:
UINT32 features = cpuid();
use_mmx = (features & (1 << 23));
use_sse = (features & (1 << 25));
use_sse2 = (features & (1 << 26));
Tourniquet is offline  
 
Page generated in 0.49157 seconds with 11 queries