HALICERY

free-time coding, hardware dev, articles

Top
Home 8042 Blogs About
Home IntelEssential The 386: IA-32 The PE-bit

Last modified: Mon Jun 22 12:47:57 UTC+0200 2026 © A. Tarpai


The PE-bit

PE is bit0 of the CR0 register: Protection Enable. Same as PE in the 286 16-bit MSW.

         15              2    1    0
        +-  --  -+----+----+----+----+
        |        |    |    |    | PE |  286 MACHINE STATUS WORD
        +-  --  -+----+----+----+----+

 31                      2    1    0
+-  --  --  --  -+----+----+----+----+
|                |    |    |    | PE |  386+ CR0 Register
+-  --  --  --  -+----+----+----+----+

Setting PE = 1 apparently does nothing. But the CPU will operate differently based on PE set or cleared:

PE can be set and cleared changing CPU operation by MOV CR0. Some restrictions apply, eg. paging requires PE set..etc. Note that the 286 LMSW (Load Machine Status Word) cannot clear PE, the 286 was unable to switch back to RM. This is also emulated on 386+ (PE stays set after LMSW, tested).

SR write

What the PE-bit means most importantly for the CPU is what happens when a SEGMENT REGISTER IS WRITTEN:

 WRITE SEG REG                   SEG REG DESCRIPTOR CACHE

+-----------+     PE=0      +-----------+-----------+------+      PE=1
|           |   ------->    |    BASE   |   LIMIT   | ATTR |    <-------  DESCRIPTOR IN MEMORY
+-----------+     x 16      +-----------+-----------+------+      FETCH