flat assembler
Message board for the users of flat assembler.
Index
> Main > Detecting CPU types |
Author |
|
decard 18 Oct 2004, 12:16
the code is nice, but don't you think that when you are determining if CPU is 386 or higher, you should consider the case when FPU isn't available?
|
|||
18 Oct 2004, 12:16 |
|
Matrix 19 Oct 2004, 12:04
yeah, you're right, i didn't mean that, the code distinguishes 80387 or better from 80287 or lower, i have some codes around here somewhere for cpu detection. however i haven't used them yet. i assumed everyone has at least a 486 system, and when i was using RDTSC i assumed everyone has at least a pentium who uses my program. |
|||
19 Oct 2004, 12:04 |
|
roticv 19 Oct 2004, 12:14
Code: pushfd or byte[esp+2],32 popfd pushfd pop eax shr eax, 22 jnc nocpuid xor eax, eax inc eax cpuid |
|||
19 Oct 2004, 12:14 |
|
Matrix 13 Nov 2004, 06:30
what do you think of my cpuID program?
its not fully optimized, but 2730 bytes in com and should detect from 8086, here's a screenshot: Code: Your CPU is: Protected Mode Pentium Pro Class GenuineIntel Processor cpuID Level: 2 - Type:Original OEM Processor Model:6 Stepping:8 Revision:6 Capabilities: MMX Technology CMOV-Cond. Move/Cmp. Inst. MCA-Machine Check Arch. PGE-PTE Global Bit MTRR-Mem. Type Range Reg. CXS-CMPXCHG8B Inst. MCE-Machine Check Exception PAE-Physical Address Extensions MSR-RDMSR and WRMSR Support TSC-Time Stamp Counter PSE-Page Size Extensions DE-Debugging Extensions VME-Virtual-8086 Mode Enhancement FPU-FPU on Chip Not supported: APIC-APIC on Chip Processor internals: - Instruction TLB: 4K-Byte Pages, 4-way set associative, 32 entries - Instruction TLB: 4M-Byte Pages, 4-way set associative, 4 entries - Da ta TLB: 4K-Byte Pages, 4-way set associative, 64 entries - L1 Instruction cache: 16K Bytes, 4-way set associative, 32 byte line size - Data TLB: 4M-Byte Pages, 4-way set associative, 8 entries - L1 Data cache: 16K Bytes, 2-way set associati ve, 32 byte line size - Unified L2 cache: 128K Bytes, 4-way set associative, 32 byte line size<---- Matrix cpuID 007 is waiting for a key to exit ---->
|
|||||||||||
13 Nov 2004, 06:30 |
|
Matrix 13 Nov 2004, 08:12
new version, hope it fits in 80x25 everyone
now shows nearly all of intel processors' features, 2996 bytes in com i guess no more fits on the 80x25 like this screenshot: Code: Your CPU is: Protected Mode Pentium Pro Class GenuineIntel Processor cpuID Level: 2 - Type:Original OEM Processor Model:6 Stepping:8 Revision:6 Capabilities: XMM-SSE (SIMD)-P3 FXSR (FXSAVE/FXRSTOR) MMX Technology 36-bit Page Size Extension Page Attribute Table CMOV-Cond. Move/Cmp. Inst. MCA-Machine Check Arch. PGE-PTE Global Bit MTRR-Mem. Type Range Reg. SEP-SYSENTER/SYSEXIT(fast system call) CXS-CMPXCHG8B Inst. MCE-Machine Check Exception PAE-Physical Address Extensions MSR-RDMSR and WRMSR Support TSC-Time Stamp Counter PSE-Page Size Extensions DE-Debugging Extensions VME-Virtual-8086 Mode Enhancement FPU-FPU on Chip Not supported: Thermal Monitor Self-Snoop SSE2-Streaming SIMD Extensions 2 Thermal Monitor&Sw Controlled Clock Debug Store CLFLUSH Instruction Processor serial number APIC-APIC on Chip internals: - Instruction TLB: 4K-Byte Pages, 4-way set associative, 32 entries - Instruction TLB: 4M-Byte Pages, 4-way set associative, 4 entries - Data TLB: 4K -Byte Pages, 4-way set associative, 64 entries - L1 Instruction cache: 16K Bytes , 4-way set associative, 32 byte line size - Data TLB: 4M-Byte Pages, 4-way set associative, 8 entries - L1 Data cache: 16K Bytes, 2-way set associative, 32 byt e line size - Unified L2 cache: 128K Bytes, 4-way set associative, 32 byte line size<---- Matrix cpuID 008 is waiting for a key to exit ---->
|
|||||||||||
13 Nov 2004, 08:12 |
|
Matrix 13 Nov 2004, 09:19
thnx to intel, my code is full of text, i could have made a better cpuID function
well ... now 5661 bytes in com, 23700 bytes in asm, and new internals added for intel processors. maeby a little shorter descriptions Code: Your CPU is: Protected Mode Pentium Pro Class GenuineIntel Processor cpuID Level: 2 - Type:Original OEM Processor Model:6 Stepping:8 Revision:6 Capabilities: XMM-SSE (SIMD)-P3 FXSR (FXSAVE/FXRSTOR) MMX Technology 36-bit Page Size Extension Page Attribute Table CMOV-Cond. Move/Cmp. Inst. MCA-Machine Check Arch. PGE-PTE Global Bit MTRR-Mem. Type Range Reg. SEP-SYSENTER/SYSEXIT(fast system call) CXS-CMPXCHG8B Inst. MCE-Machine Check Exception PAE-Physical Address Extensions MSR-RDMSR and WRMSR Support TSC-Time Stamp Counter PSE-Page Size Extensions DE-Debugging Extensions VME-Virtual-8086 Mode Enhancement FPU-FPU on Chip Not supported: Thermal Monitor Self-Snoop SSE2-Streaming SIMD Extensions 2 Thermal Monitor&Sw Controlled Clock Debug Store CLFLUSH Instruction Processor serial number APIC-APIC on Chip internals: - Instruction TLB: 4-KBPages, 4-way set associative, 32 entries - Ins truction TLB: 4-MB Pages, fully associative, 2 entries - Data TLB: 4-KB Pages, 4 -way set associative, 64 entries - L1 instruction cache: 16-KB, 4-way set associ ative, 32-byte line size - Data TLB: 4-MB Pages, 4-way set associative, 8 entrie s - L1 data cache: 16-KB, 4-way set associative, 32-byte line size - L2 cache: 1 28-KB, 4-way set associative, 32-byte line size<---- Matrix cpuID 009 is waiting for a key to exit ---->
|
|||||||||||
13 Nov 2004, 09:19 |
|
Adam Kachwalla 22 Sep 2006, 11:50
Cannot access any of your RAR files: I get a CRC error
|
|||
22 Sep 2006, 11:50 |
|
Vasilev Vjacheslav 23 Sep 2006, 15:00
Adam Kachwalla, try to use newer winrar
|
|||
23 Sep 2006, 15:00 |
|
rugxulo 24 Sep 2006, 00:17
Matrix, if you're concerned about the .COM filesize, use aPACK or UPX or something.
BTW, there are three fixes for the 25-lines limit:
P.S. Get UNRAR for DOS, if you need it. |
|||
24 Sep 2006, 00:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.