3 ms·
The 32-bit registers are accessible in real mode too, it only requires a prefix to each opcode (and the same is true when using the 16-bit registers in 32- or 6
by rep_lodsb 3y ago
The 32-bit registers are accessible in real mode too, it only requires a prefix to each opcode (and the same is true when using the 16-bit registers in 32- or 64-bit mode). There is also no restriction on using the FS and GS registers in real mode, they work like any other segment register.
There really is surprisingly little difference between real and protected mode, it mainly affects how segment registers are loaded. Internally, each segment register has a base and limit field that is used the same regardless of mode.
Loading a segment register in real mode sets the base to the value shifted left by 4 bits, but leaves the limit unchanged. By briefly entering protected mode and loading descriptors with a limit of 4 GiB, it would remain that way after switching back to real mode, giving access to the full address space (this is called "flat real", "unreal", or "voodoo" mode).