-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathMOVRS.htm
91 lines (74 loc) · 2.75 KB
/
MOVRS.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
80386 Programmer's Reference Manual -- Opcode MOV Special Registers
</TITLE>
</HEAD>
<BODY STYLE="width:80ch">
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="MOV.htm"> MOV Move Data</A><BR>
<B>next:</B><A HREF="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 mod field are
always 11. The r/m field specifies the general register involved.
<P>
<HR>
<P>
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="MOV.htm"> MOV Move Data</A><BR>
<B>next:</B><A HREF="MOVS.htm">
MOVS/MOVSB/MOVSW/MOVSD Move Data from String to String</A>
</BODY>