Intel 80386 DJ Equipment User Manual


 
inter
80386
FLAGS
3 3 2 2 2 2 2 2 2
222
1 1 1 1 1 1 1 1 1
1
0 9 8 7 6 5
432
1 0 9 8 7 6 5 4 3 2 0 9 8 7 6 5
432
1 0
EFLAGS
RESERVED
FOR
INTEL
VIRTUAL
MODE---------'
RESUME
FLAG
-:;:;.:======::::'-.J
NESTED
TASK
FLAG
I/O
PRIVILEGE
LEVEL----------'
OVERFLOW--------------'
DIRECTION
FLAG"7===========:::::::~
INTERRUPT
ENABLE
231630-50
Figure 2-3. Flags Register
VM
(Virtual 8086 Mode, bit 17)
The
VM
bit provides Virtual
8086
Mode within
Protected Mode. If set while the
80386
is
in
Protected Mode, the
80386
will switch to
Vir-
tual
8086
operation, handling segment loads
as
the 8086 does, but generating exception
13 faults
on
privileged opcodes. The
VM
bit
can
be
set only
in
Protected Mode,
by
the
IRET instruction (if current privilege level =
0) and by task switches at any privilege level.
The
VM
bit
is
unaffected by
POPF.
PUSHF
always pushes a a
in
this bit, even if execut-
ing
in
virtual
8086
Mode. The EFLAGS image
pushed during interrupt processing or saved
during task switches will contain a 1
in
this bit
if the interrupted code was executing
as
a
Vir-
tual
8086
Task.
RF
(Resume
Flag,
bit 16)
The
RF
flag is used
in
conjunction with the
debug register breakpoints.
It
is
checked at
instruction boundaries before breakpoint
processing. When
RF
is
set, it causes any de-
bug
fault to be ignored
on
the next instruc-
tion.
RF
is
then automatically reset at the suc-
cessful completion
of every instruction (no
faults are signalled) except the IRET instruc-
tion, the
POPF
instruction,
(and
JMP,
CALL,
and
INT instructions causing a task switch).
These instructions set
RF
to the value speci-
fied
by
the memory image. For example, at
the end of the breakpoint service routine,
9
the IRET instruction can pop
an
EFLAG im-
age
having the
RF
bit set and resume the
program's execution at the breakpoint
ad-
dress without generating another breakpoint
fault
on
the same location.
NT
(Nested Task, bit 14)
This flag applies to Protected Mode. NT
is
set
to indicate that the execution of this task
is
nested within another task.
If
set, it indicates
that the current nested task's Task
State
Segment
(TSS)
has a valid back link to the
previous task's
TSS.
This bit is set or reset
by
control transfers to other tasks. The value of
NT
in
EFLAGS
is
tested by the IRET instruc-
tion to determine whether to do
an
inter-task
return or
an
intra-task return. A POPF or
an
IRET instruction will affect the setting of this
bit according to the image popped, at any
privilege level.
10PL
(Input/Output Privilege Level, bits 12-13)
This two-bit field applies to Protected Mode.
10PL indicates the numerically maximum CPL
(current privilege
level) value permitted to ex-
ecute
1/0
instructions without generating
an
exception 13 fault or consulting the
1/0
Per-
mission Bitmap. It also indicates the maxi-
mum
CPL
value allowing alteration of the
IF
(INTR Enable Flag) bit when new values are
popped into the EFLAG register.
POPF
and
IRET instruction can alter the
10PL
field when
executed at
CPL
=
O.
Task switches can al-
ways alter the 10PL field, when the new flag
image is loaded from the incoming task's
TSS.