CPUID: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m →External Links: the link to AMD's documentation was dead |
m Added a note |
||
Line 2: | Line 2: | ||
== How to use CPUID == |
== How to use CPUID == |
||
=== Checking CPUID availability === |
|||
⚫ | |||
'''Note:''' Implementing this routine in for example C can lead to issues, because the compiler may change EFLAGS at any time. |
|||
⚫ | |||
This assembly routine checks if CPUID is supported: |
|||
<source lang="asm"> |
<source lang="asm"> |
||
Line 24: | Line 27: | ||
</source> |
</source> |
||
=== Basic usage === |
|||
The idea of the CPUID instruction is that you can call it with different values in EAX, and it will return different information about the processor. For example, if we want the Vendor ID String (see below), we should code something like that: |
The idea of the CPUID instruction is that you can call it with different values in EAX, and it will return different information about the processor. For example, if we want the Vendor ID String (see below), we should code something like that: |
||