📄 verr.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>80386 Programmer's Reference Manual -- Opcode VERR</TITLE></HEAD><BODY><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="TEST.htm"> TEST Logical Compare</A><BR><B>next:</B><A HREF="WAIT.htm"> WAIT Wait until BUSY# Pin is Inactive (HIGH)</A><P><HR><P><H1>VERR, VERW -- Verify a Segment for Reading or Writing</H1><PRE>Opcode Instruction Clocks Description0F 00 /4 VERR r/m16 pm=10/11 Set ZF=1 if segment can be read, selector in r/m160F 00 /5 VERW r/m16 pm=15/16 Set ZF=1 if segment can be written, selector in r/m16</PRE><H2>Operation</H2><PRE>IF segment with selector at (r/m) is accessible with current protection level AND ((segment is readable for VERR) OR (segment is writable for VERW))THEN ZF := 0;ELSE ZF := 1;FI;</PRE><H2>Description</H2>The two-byte register or memory operand of VERR and VERW containsthe value of a selector. VERR and VERW determine whether thesegment denoted by the selector is reachable from the current privilegelevel and whether the segment is readable (VERR) or writable (VERW).If the segment is accessible, the zero flag is set to 1; if the segment isnot accessible, the zero flag is set to 0. To set ZF, the followingconditions must be met:<UL> <LI> The selector must denote a descriptor within the bounds of the table (GDT or LDT); the selector must be "defined." <LI> The selector must denote the descriptor of a code or data segment (not that of a task state segment, LDT, or a gate). <LI> For VERR, the segment must be readable. For VERW, the segment must be a writable data segment. <LI> If the code segment is readable and conforming, the descriptor privilege level (DPL) can be any value for VERR. Otherwise, the DPL must be greater than or equal to (have less or the same privilege as) both the current privilege level and the selector's RPL.</UL>The validation performed is the same as if the segment were loaded intoDS, ES, FS, or GS, and the indicated access (read or write) wereperformed. The zero flag receives the result of the validation. Theselector's value cannot result in a protection exception, enabling thesoftware to anticipate possible segment access problems.<H2>Flags Affected</H2>ZF as described above<H2>Protected Mode Exceptions</H2>Faults generated by illegal addressing of the memory operand thatcontains the selector, the selector is not loaded into any segmentregister, and no faults attributable to the selector operand are generated<P>#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; VERR and VERW are not recognized in Real Address Mode<H2>Virtual 8086 Mode Exceptions</H2>Same exceptions as in Real Address Mode; #PF(fault-code) for a pagefault<P><HR><P><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="TEST.htm"> TEST Logical Compare</A><BR><B>next:</B><A HREF="WAIT.htm"> WAIT Wait until BUSY# Pin is Inactive (HIGH)</A></BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -