وو

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

وو

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

WRMSR

WRMSR 

Usage: WRMSR                                           Modifies flags: None

Writes the contents of  EDX:EAX into the 64-bit model specific register (MSR) specified in the ECX register.

Write Model-Specific Registers


WRMSR                         ; 0F 30                [PENT]


WRMSR writes the values in EDX:EAX to the processor Model-Specific Register (MSR) whose index is stored in ECX. See also RDMSR.


The input value loaded into the ECX register is the address of the MSR to be written to. The contents of the EDX register are copied to high-order 32 bits of the selected MSR and the contents of the EAX register are copied to low-order 32 bits of the MSR. Undefined or reserved bits in an MSR should be set to the values previously read.


The MSRs and the ability to read them with the WRMSR instruction were introduced into the IA-32 architecture with the Pentium processor. Execution of this instruction by an IA-32 processor earlier than the Pentium processor results in an invalid opcode exception #UD.


Example:

mov ecx MsrAddr

mov eax ValueLo

mov edx ValueHi

wrmsr