flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Projects and Ideas > CPUID | 
| Author | 
 | 
| asmfan 09 Jun 2007, 20:01 This app displays ALL CPUID info in HEX and ANSI that can be obtained using cpuid command.
 It recursively retrieves CPUID data for processor. For ditailed info on HEX values in registers refer to manuals (intel, amd etc.). Anyone can use and modify it for more informative view with mention to my nickname. Testing on different: very old/modern CPUs is appreciated. ___________ *Added procedure to substitute control symbols (CR/LF) that passed as strings to wsprintf with spaces. *Updated again with right procedure of parsing ctrl symbols - CPUID instr returns only ASCII (ANSI?) strings and NO unicode. *Replaced "modern" instructions: CMOVcc, MOVZX with their old equivalents for compatibility. *Now more informative. *both ANSI & UNICODE versions attached. *updated messages when cpuid instruction is n/a. *several additions according to cpuid specification updates. 
 
 _________________ Any offers? Last edited by asmfan on 23 Sep 2009, 15:03; edited 16 times in total | |||||||||||||||||||||
|  09 Jun 2007, 20:01 | 
 | 
| asmfan 19 Jul 2007, 17:15 New version and changes in 1st message.
 ______________________________________ 10x rugxulo for cheering me up ) Yes, it is win32 exe, but it only uses 3 API funcs - ExitProcess, MessageBox and wsprintf. just replace then with dos ints and appropriate handlers (i mean processing strings - strcat etc.) and you'll get the equivalent cuz cpuid instruction works with whole 32bit (64 in Win64) register even in 16bit mode. | |||
|  19 Jul 2007, 17:15 | 
 | 
| rugxulo 20 Jul 2007, 02:18 Actually, you use CMOVZ in there, so it probably won't work on lower than a PII (or PPro or whatever). | |||
|  20 Jul 2007, 02:18 | 
 | 
| asmfan 20 Jul 2007, 10:48 i just got it the morning after i wrote the code this night )
 just wrote branchless code as optimization says... not so difficult at all to fix it. | |||
|  20 Jul 2007, 10:48 | 
 | 
| asmfan 20 Jul 2007, 11:21 rugxulo done. Updated 1st post. | |||
|  20 Jul 2007, 11:21 | 
 | 
| Madis731 25 Jul 2007, 15:50 Works ok, but what does "No"-button do   I think OK and Cancel should be the buttons or only one button - OK - and then "X" in the corner to close it...  just a note. | |||
|  25 Jul 2007, 15:50 | 
 | 
| asmfan 25 Jul 2007, 16:47 Madis731 wrote: Works ok Thanks! OK here means step ahead on cpuid detection and CANCEL step to extended features flag or out if we are already in there. [added] New version here. _________________ Any offers? | |||
|  25 Jul 2007, 16:47 | 
 | 
| ATV 27 Jul 2007, 07:05 asmfan, I tested it with Win98 with P166. It only show empty window with 2 buttons (yes/no). No window caption or any text inside window.
 I replace 'win32wxp.inc' with 'win32a.inc' and then it works ok. | |||
|  27 Jul 2007, 07:05 | 
 | 
| asmfan 27 Jul 2007, 08:19 ATV
 thanks for testing. Attached ANSI version for legasy OSes. /just changed the header )) to *axp.inc - thanks to macroses TCHAR/ | |||
|  27 Jul 2007, 08:19 | 
 | 
| DOS386 27 Jul 2007, 21:30 asmfan wrote:
 > Also could somebody with p3 and less test it? YES (see shots).   > Updated again with right procedure of parsing ctrl symbols - CPUID instr returns only ASCII (ANSI?) strings and NO unicode. GOOD.   > Replaced "modern" instructions: CMOVcc, MOVZX with their old equivalents for compatibility. GOOD.  Fully 80386 compatible now ? > both ANSI & UNICODE versions attached Seems you just fixed bug I was about to report.   Any benefit of UNICODE here at all ?   Any way to provide just 1 version ?   Issues: - If CPUID inavailable, report " CPUID instruction NOT available, CPU is 80386 or 80486-old ", rather than silent exit. - CANCEL button and "extended" CPUID - odd design ? 
 _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug | ||||||||||
|  27 Jul 2007, 21:30 | 
 | |||||||||
| DOS386 27 Jul 2007, 21:31 rugxulo wrote:
 > If this would run in DOS It does (see shots)  | |||
|  27 Jul 2007, 21:31 | 
 | 
| asmfan 28 Jul 2007, 08:10 NTOSKRNL_VXE wrote: 
 Not sure - cannot find such an ancient CPU ) NTOSKRNL_VXE wrote: 
 Since UNICODE support is native to modern Win OS - i support it. No benefit at all - only double memory consumption. Oh, found one bft - native languages of nonenglish speaking people ) (just joking) NTOSKRNL_VXE wrote: 
 Done - but alas cannot really test (not using Olly) )) the same reason. NTOSKRNL_VXE wrote: 
 Nope, "cancel" it's just shortcut to ext feat, since just pushing "ok" can be boring ) (e.g. i have to push "ok" 13 decimal times before i get ext. features, and only 1 "cancel"). /another reason - don't want to mess with nicer GUI developement  / _________________ Any offers? | |||
|  28 Jul 2007, 08:10 | 
 | 
| asmfan 28 Jul 2007, 08:16 NTOSKRNL_VXE wrote: 
 Post DOS version here if you don't mind. And let people with 386/486 try it ) btw intel manual says that only late 486 cpu support cpuid instruction. | |||
|  28 Jul 2007, 08:16 | 
 | 
| Dex4u 28 Jul 2007, 23:40 Theres a cpuid program for DexOS, done 2-3 years a go 
 | ||||||||||
|  28 Jul 2007, 23:40 | 
 | |||||||||
| DOS386 29 Jul 2007, 10:48 > Theres a cpuid program for DexOS
 YES. The CPUID program is very good ... the top 28 lines of the shot a bit less   > > Fully 80386 compatible now ? > Not sure - cannot find such an ancient CPU Checked with BIEW - seems to be, except the CPUID instruction ... > Post DOS version here if you don't mind. I have none ... ran yours on HX   But here there is a DOS CPUID: http://rayer.ic.cz/programm/programe.htm asmfan wrote: > intel manual says that only late 486 cpu support cpuid instruction. I wrote: > CPUID instruction NOT available, CPU is 80386 or 80486-old  | |||
|  29 Jul 2007, 10:48 | 
 | 
| rugxulo 31 Jul 2007, 03:04 I mentioned somewhere on these forums that DOSBox 0.70 supported CPUID (emulates a 486 DX2) yet I found out (through Rayer's program) that it doesn't let the ID flag be set, so it doesn't correctly let you know that it supports it (even though it does). I should probably report that to them.
 As far as testing on old computers, I've got a P166 (no MMX), which does support CPUID, and a 486 Sx/25, which doesn't. I'll go test and report what happens. (But DOSBox 0.70 + HXRT.ZIP + HXGUI.ZIP + "CPUID ANSI.RAR", at least, correctly whines and lets you exit.) 
 Last edited by rugxulo on 31 Jul 2007, 04:19; edited 1 time in total | ||||||||||
|  31 Jul 2007, 03:04 | 
 | |||||||||
| rugxulo 31 Jul 2007, 04:18 my 486 Sx/25 wrote: 
 In other words, HXGUI doesn't work without VESA 2.0. (And my attempts to install UNIVBE 6.7 on the 486 didn't work, probably because of no FPU.) However, the P166 (no MMX) worked okay (although I did have to use UNIVBE there, normally is only VESA 1.2 ATI Mach64). dpmild32 af-cpuid.exe (had to rename it b/c spaces in filenames are weird) BTW, Ctrl+Break didn't work for me in HXGUI, had to use APPS button (aka, right-click menu button?) on Win95 keyboard to bring up menu to allow screenshots (because Snarf didn't work). Oh, and HXGUIHLP.INI needed "save=0" to not mess up the palette upon exit (weird). 
 
 | |||||||||||||||||||
|  31 Jul 2007, 04:18 | 
 | ||||||||||||||||||
| asmfan 22 Dec 2008, 12:08 *added new features detection support for modern processors
 Testing on Core 2 8000 & 9000 series & i7 for input eax=0Bh and eax=0Dh parameters appreciated. | |||
|  22 Dec 2008, 12:08 | 
 | 
| asmfan 23 Sep 2009, 08:46 several additions according to cpuid specification updates apllied to prev. post (iterative 0xD leaf). | |||
|  23 Sep 2009, 08:46 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.