It is perfect!
Thanks
I was thinking of using the array i created and loop through the OS_IsFeaturePresent to make the code smaller.
[code=thinbasic]
uses "OS"
dim N(14) AS dword
DIM i AS Byte
DIM sMsg as STRING
DIM lType AS STRING
Dim ArrayName() As String
Dim Delimiter As String VALUE "," ' Character used to seperate
Dim nTokens As DWORD
Dim Counter As DWORD
if OS_WinGetVersionTimeline < %OS_Windows_nt then
MSGBOX 0, "SORRY FUNCTION NOT AVAILABLE"
STOP
ELSE
lType = "%PF_FLOATING_POINT_PRECISION_ERRATA,"
lType += "%PF_FLOATING_POINT_EMULATED,%PF_COMPARE_EXCHANGE_DOUBLE,"
lType += "%PF_MMX_INSTRUCTIONS_AVAILABLE,%PF_XMMI_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_RDTSC_INSTRUCTION_AVAILABLE,%PF_3DNOW_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_PAE_ENABLED,%PF_XMMI64_INSTRUCTIONS_AVAILABLE,%PF_NX_ENABLED,"
lType += "%PF_SSE3_INSTRUCTIONS_AVAILABLE,%PF_COMPARE_EXCHANGE128,"
lType += "%PF_COMPARE64_EXCHANGE128,%PF_CHANNELS_ENABLED"
N(1) = OS_IsFeaturePresent(%PF_FLOATING_POINT_PRECISION_ERRATA)
N(2) = OS_IsFeaturePresent(%PF_FLOATING_POINT_EMULATED)
N(3) = OS_IsFeaturePresent(%PF_COMPARE_EXCHANGE_DOUBLE)
N(4) = OS_IsFeaturePresent(%PF_MMX_INSTRUCTIONS_AVAILABLE)
N(5) = OS_IsFeaturePresent(%PF_XMMI_INSTRUCTIONS_AVAILABLE)
N(6) = OS_IsFeaturePresent(%PF_RDTSC_INSTRUCTION_AVAILABLE)
N(7) = OS_IsFeaturePresent(%PF_3DNOW_INSTRUCTIONS_AVAILABLE)
N( = OS_IsFeaturePresent(%PF_PAE_ENABLED)
N(9) = OS_IsFeaturePresent(%PF_XMMI64_INSTRUCTIONS_AVAILABLE)
N(10) = OS_IsFeaturePresent(%PF_NX_ENABLED)
N(11) = OS_IsFeaturePresent(%PF_SSE3_INSTRUCTIONS_AVAILABLE)
N(12) = OS_IsFeaturePresent(%PF_COMPARE_EXCHANGE12
N(13) = OS_IsFeaturePresent(%PF_COMPARE64_EXCHANGE12
N(14) = OS_IsFeaturePresent(%PF_CHANNELS_ENABLED)
nTokens = SPLIT(lType, Delimiter, ArrayName)
sMsg = "Your Processor supports" & $CRLF & $CRLF
For i = 1 to 14
if n(i) = 1 Then sMsg += ArrayName(i) & $CRLF
ENDIF
Next
ENDIF
MSGBOX 0, sMsg[/code]
My CPU
Processor 1 (ID = 0)
Number of cores 2
Number of threads 2 (max 2)
Name Intel Pentium D 930
Codename Presler
Specification Intel(R) Pentium(R) D CPU 3.00GHz
Package Socket 775 LGA (platform ID = 2h)
CPUID F.6.2
Extended CPUID F.6
Core Stepping B1
Technology 65 nm
Core Speed 3010.7 MHz (15.0 x 200.7 MHz)
Rated Bus speed 802.8 MHz
Stock frequency 3000 MHz
Instructions sets MMX, SSE, SSE2, SSE3, EM64T
L1 Data cache 2 x 16 KBytes, 8-way set associative, 64-byte line size
Trace cache 2 x 12 Kuops, 8-way set associative
L2 cache 2 x 2048 KBytes, 8-way set associative, 64-byte line size
FID/VID Control no
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
It is perfect!
Thanks
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Rather than all the program I wrote could is it possible to add or change the keyword to return an array already filled with the values.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Yes, maybe an idea. I will post this into feature request forum.Originally Posted by Abraxas
Regarding your example, it seems the string names do not have the same sequence of the values in the array (if I'm not wrong) giving strange results.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
I missed a line. see edited version.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
mmmh, I think also some other param is not in the same sequence.
Better to use same sequence:
[code=thinbasic]lType += "%PF_FLOATING_POINT_PRECISION_ERRATA,"
lType += "%PF_FLOATING_POINT_EMULATED,"
lType += "%PF_COMPARE_EXCHANGE_DOUBLE,"
lType += "%PF_MMX_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_RDTSC_INSTRUCTION_AVAILABLE,"
lType += "%PF_3DNOW_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_PAE_ENABLED,"
lType += "%PF_XMMI64_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_NX_ENABLED,"
lType += "%PF_SSE3_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_XMMI_INSTRUCTIONS_AVAILABLE,"
lType += "%PF_COMPARE_EXCHANGE128,"
lType += "%PF_COMPARE64_EXCHANGE128,"
lType += "%PF_CHANNELS_ENABLED"[/code]
With this problem, you gave me an idea about values assignment ...
... I need some time to think about a possible future implementation of easy assignment of multiple values.
Thanks
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
I should stop cutting and pasting. should be ok now but cpuz report sse3 for my cpu and the program doesnt.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Thanks for this script!,
at least I can see why programs are complaining I have no SSE... as I really don't have it.
But at least 3DNow! is here
Bye,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks