Re: System Info Through Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Not sure if this is anything remotely like what you want, but many years ago I wrote some Phix-only inline assembly, demo/cpuid.exw which outputs eg:

maxlevel is 13 
vendorID is GenuineIntel 
cpuid(0,1,0) [Feature Information]: 
eax is 000206A7 
family is 6 
model is 522 
processor_type is 0 (original OEM) 
steppingID is 7 
ebx is 03100800 
apicID is 3 
cpu_count is 16 
chunks is 8 
brandID is 0 
edx is BFEBFBFF 
FPU: 1 
TSC: 1 
CMOV: 1 
PSN: 0 
MMX: 1 
SSE: 1 
SSE2: 1 
ecx is 0C98E3BF 
SSE3: 1 
cpuid(0,2,0) [Cache descriptors]: 
times = 1 
eax is 76035A01 
ebx is 00F0B2FF 
edx is 00CA0000 
ecx is 00000000 
{1,90'Z',3,118'v',255,178,240,0,0,0,202,0,0,0,0,0} 
cpuid(0,4,0) [Deterministic Cache Parameters]: 
eax is 1C004121 
eax is 1C004121 
cache type is 1 [Data cache] 
cache level is 1 
self initialising cache is 1 
fully associative cache is 0 
ebx is 01C0003F 
edx is 00000000 
edx is 00000000 
ecx is 0000003F 
cache_size is 32256 
cpuid(0,4,1) [Deterministic Cache Parameters]: 
eax is 1C004122 
eax is 1C004122 
cache type is 2 [Instruction cache] 
cache level is 1 
self initialising cache is 1 
fully associative cache is 0 
ebx is 01C0003F 
edx is 00000000 
edx is 00000000 
ecx is 0000003F 
cache_size is 32256 
cpuid(0,4,2) [Deterministic Cache Parameters]: 
eax is 1C004143 
eax is 1C004143 
cache type is 3 [Unified cache] 
cache level is 2 
self initialising cache is 1 
fully associative cache is 0 
ebx is 01C0003F 
edx is 00000000 
edx is 00000000 
ecx is 000001FF 
cache_size is 261632 
cpuid(0,4,3) [Deterministic Cache Parameters]: 
eax is 1C03C163 
eax is 1C03C163 
cache type is 3 [Unified cache] 
cache level is 3 
self initialising cache is 1 
fully associative cache is 0 
ebx is 02C0003F 
edx is 00000006 
edx is 00000002 
ecx is 00000FFF 
cache_size is 3144960 
cpuid(0,4,4) [Deterministic Cache Parameters]: 
eax is 00000000 
eax is 00000000 
cache type is 0 [Null, no more caches] 
levels>=5 not investigated... 
 
Extended Functions: 
 
maxlevel is 8 
eax is 80000008 
cpuid(1,1,0) [Extended Feature Flags]: 
edx is 20100000 
processor name string is "Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz" 
cpuid(1,6,0) [Extended L2 cache features]: 
ecx is 01006040 
L2 cache size = 256K 
L2 cache associativity = 6 [8-Way] 
L2 cache line size = 64 
levels>=7 not investigated... 

You can see the (ugly) source code here, which also contains a couple of possible links.

On OpenEuphoria, you might be able to cobble something similar up with Pete Eberlein's Mini-Assembler.

Or maybe anything found on flatassembler could be packaged into a dll fairly easily.

I suppose I could even try packaging that cpuid code into a Phix-built dll which could be invoked from OpenEuphoria... maybe.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu