وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

CPUID

CPUID 

Usage: CPUID                                            Modifies flags: None

Returns processor identification and features information in the EAX, EBX, ECX, and EDX registers. The instruction's output is dependent on the contents of the EAX register upon execution. 

Get CPU Identification Code


CPUID                         ; 0F A2                [PENT]


CPUID returns various information about the processor it is being executed on. It fills the four registers EAX, EBX, ECX and EDX with information, which varies depending on the input contents of EAX.


CPUID also acts as a barrier to serialize instruction execution: executing the CPUID instruction guarantees that all the effects (memory modification, flag modification, register modification) of previous instructions have been completed before the next instruction gets fetched.


The information returned is as follows:


If EAX is zero on input, EAX on output holds the maximum acceptable input value of EAX, and EBX:EDX:ECX contain the string 'GenuineIntel' (or not, if you have a clone processor). That is to say, EBX contains 'Genu' (in ROSASM's own sense of character constants, described in ), EDX contains 'ineI' and ECX contains 'ntel'.


If EAX is one on input, EAX on output contains version information about the processor, and EDX contains a set of feature flags, showing the presence and absence of various features. For example, bit 8 is set if the CMPXCHG8B instruction ( CMPXCHG8B) is supported, bit 15 is set if the conditional move instructions ( CMOVcc and  FCMOVB) are supported, and bit 23 is set if MMX instructions are supported.


If EAX is two on input, EAX, EBX, ECX and EDX  all contain information about caches and TLBs (Translation Lookahead Buffers).


For more information on the data returned from CPUID, see the documentation from Intel and other processor manufacturers.


EXAMPLE:

mov eax 1

cpuid