Files
oldlinux-files/Ref-docs/manual Intel386/I386Manual/MOVRS.HTM
2024-02-19 00:21:47 -05:00

72 lines
3.2 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Opcode MOV Special Registers</title>
</head>
<body>
<b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="MOV.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOV.HTM"> MOV Move Data</a><br>
<b>next:</b><a href="MOVS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVS.HTM"> MOVS/MOVSB/MOVSW/MOVSD Move Data from String to String</a>
<p>
<hr>
<p>
<h1>MOV -- Move to/from Special Registers</h1>
<pre>
Opcode Instruction Clocks Description
0F 20 /r MOV r32,CR0/CR2/CR3 6 Move (control register) to
(register)
0F 22 /r MOV CR0/CR2/CR3,r32 10/4/5 Move (register) to (control
register)
0F 21 /r MOV r32,DR0 -- 3 22 Move (debug register) to
(register)
0F 21 /r MOV r32,DR6/DR7 14 Move (debug register) to
(register)
0F 23 /r MOV DR0 -- 3,r32 22 Move (register) to (debug
register)
0F 23 /r MOV DR6/DR7,r32 16 Move (register) to (debug
register)
0F 24 /r MOV r32,TR6/TR7 12 Move (test register) to
(register)
0F 26 /r MOV TR6/TR7,r32 12 Move (register) to (test
register)
</pre>
<h2>Operation</h2>
<pre>
DEST := SRC;
</pre>
<h2>Description</h2>
The above forms of MOV store or load the following special registers in or from a general purpose register:
<ul>
<li>Control registers CR0, CR2, and CR3
<li>Debug Registers DR0, DR1, DR2, DR3, DR6, and DR7
<li>Test Registers TR6 and TR7
</ul>
32-bit operands are always used with these instructions, regardless of the operand-size attribute.
<h2>Flags Affected</h2>
OF, SF, ZF, AF, PF, and CF are undefined
<h2>Protected Mode Exceptions</h2>
#GP(0) if the current privilege level is not 0
<h2>Real Address Mode Exceptions</h2>
None
<h2>Virtual 8086 Mode Exceptions</h2>
#GP(0) if instruction execution is attempted
<h2>Notes</h2>
The instructions must be executed at privilege level 0 or in real-address mode; otherwise, a protection exception will be raised.
<p>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.
<p>
<hr>
<p><b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="MOV.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOV.HTM"> MOV Move Data</a><br>
<b>next:</b><a href="MOVS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVS.HTM"> MOVS/MOVSB/MOVSW/MOVSD Move Data from String to String</a>
</body>