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

52 lines
3.0 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Opcode SGDT</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="SETCC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SETCC.HTM"> SETcc Byte Set on Condition</a><br>
<b>next:</b><a href="SHLD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SHLD.HTM"> SHLD Double Precision Shift Left</a>
<p>
<hr>
<p>
<h1>SGDT/SIDT -- Store Global/Interrupt Descriptor Table Register</h1>
<pre>
Opcode Instruction Clocks Description
0F 01 /0 SGDT m 9 Store GDTR to m
0F 01 /1 SIDT m 9 Store IDTR to m
</pre>
<h2>Operation</h2>
<pre>
DEST := 48-bit BASE/LIMIT register contents;
</pre>
<h2>Description</h2>
SGDT/SIDT copies the contents of the descriptor table register the six bytes of memory indicated by the operand. The LIMIT field of the register is assigned to the first word at the effective address. If the operand-size attribute is 32 bits, the next three bytes are assigned the BASE field of the register, and the fourth byte is written with zero. The last byte is undefined. Otherwise, if the operand-size attribute is 16 bits, the next four bytes are assigned the 32-bit BASE field of the register.
<p>SGDT and SIDT are used only in operating system software; they are not used in application programs.
<h2>Flags Affected</h2>
None
<h2>Protected Mode Exceptions</h2>
Interrupt 6 if the destination operand is a register; #GP(0) if the destination is in a nonwritable segment; #GP(0) for an illegal memory operand effective address in the CS, DS, ES, FS, or GS segments; #SS(0) for an illegal address in the SS segment; #PF(fault-code) for a page fault
<h2>Real Address Mode Exceptions</h2>
Interrupt 6 if the destination operand is a register; Interrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFH
<h2>Virtual 8086 Mode Exceptions</h2>
Same exceptions as in Real Address Mode; #PF(fault-code) for a page fault
<h2>Compatability Note</h2>
The 16-bit forms of the SGDT/SIDT instructions are compatible with the 80286, if the value in the upper eight bits is not referenced. The 80286 stores 1's in these upper bits, whereas the 80386 stores 0's if the operand-size attribute is 16 bits. These bits were specified as undefined by the SGDT/SIDT instructions in the iAPX 286 Programmer's Reference Manual.
<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="SETCC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SETCC.HTM"> SETcc Byte Set on Condition</a><br>
<b>next:</b><a href="SHLD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SHLD.HTM"> SHLD Double Precision Shift Left</a>
</body>