80386 Programmer's Reference Manual -- Opcode MOV Special Registers

MOV -- Move to/from Special Registers

OpcodeInstructionClocks DescriptionExample
0F 20 /rmovl cr0/cr2/cr3,r326 Move (control register) to (register)movl %cr0,%ebx
movl %cr2,%ebx
movl %cr3,%ebx
0F 22 /rmovl r32,cr0/cr2/cr310/4/5 Move (register) to (control register)movl %ebx,%cr0
movl %ebx,%cr2
movl %ebx,%cr3
0F 21 /rmovl dr0-3,r3222 Move (debug register) to (register)movl %dr0,%ebx
0F 21 /rmovl dr6/dr7,r3214 Move (debug register) to (register)movl %dr6,%ebx
movl %dr7,%ebx
0F 23 /rmovl r32,dr0-322 Move (register) to (debug register)movl %ebx,%dr0
0F 23 /rmovl r32,dr6/dr716 Move (register) to (debug register)movl %ebx,%dr6
movl %ebx,%dr7
0F 24 /rmovl tr6/tr7,r3212 Move (test register) to (register)movl %tr6,%ebx
movl %tr7,%ebx
0F 26 /rmovl r32,tr6/tr712 Move (register) to (test register)movl %ebx,%tr6
movl %ebx,%tr7




The above forms of MOV store or load the following special registers in or from a general purpose register:
  • Control registers CR0, CR2, and CR3
  • Debug Registers DR0, DR1, DR2, DR3, DR6, and DR7
  • Test Registers TR6 and TR7
32-bit operands are always used with these instructions, regardless of the operand-size attribute.

Flags Affected

OF, SF, ZF, AF, PF, and CF are undefined

Protected Mode Exceptions

#GP(0) if the current privilege level is not 0

Real Address Mode Exceptions


Virtual 8086 Mode Exceptions

#GP(0) if instruction execution is attempted


The instructions must be executed at privilege level 0 or in real-address mode; otherwise, a protection exception will be raised.

The reg field within the ModRM byte specifies which of the special registers in each category is involved. The two bits in the field are always 11. The r/m field specifies the general register involved.

[Home Page dell'ITIS "Fermi"] [80386 Programmer's Reference Manual Index] [Previous] [Next]