I stumbled upon a file I wrote when I was only 12 years old when I coded a DOS game called Galawar (
downloadable here!). I had an insane amount of computer knowledge back then:
This is me, sometime in 1999...==============================================================================
----- *** What is protected mode? *** ------------
==============================================================================
Protected mode isn't even close to a mode of security as you might think.
In fact, it is very different than that! Protected mode is a mode of your
CPU, where it can access(by using 24-bit memory addresses) a bigger amount of
memory than the usual 640 KB or less of conventional memory. Conventional
memory was the first memory to work with the 8086 and 8088 processors. Before
that, there was only 64 KB of memory or less to work with. Can you imagine?
Now, with the introduction of the 286 processor, we entered the world of
megabytes. The maximum amount of memory a 286 processor could have accessed
using protected mode was 16 MB. Protected mode was enabled and is enabled still
by the most common driver, HIMEM.SYS. It enables access to the High memory area
which can exceed the old 640 KB limit.
Galawar uses the 386 processor which has some enhancements. It can access
memory using the virtual x86 mode, which is a mode that can simulate memory
through the hard disk using a page file(when there is not enough memory it
automatically swaps out some data to the hard disk. This is called A20 line
control and is enabled by HIMEM.SYS). Galawar uses the 32-bit enhancement
of the 386 processor to enable faster processing and, therefore, larger data
to go with the 16 MB of memory which can be accessed. 32-bit operating can't
be used on a 286 processor which wasn't a 32-bit processor. That's why, even
though Galawar uses protected mode compatible with the 286, Galawar needs a
386 processor to run.
Protected mode is divided into two categories of memory, which can each
equal a maximum of 16 MB per block. The first and fastest kind is XMS memory,
which Galawar uses. Galawar could have used EMS memory, the second kind, but
it is a lot slower because it is divided into small handles. Each handle can't
be bigger than 16 KB. That's why, instead of using EMS memory, Galawar turned
back to the old conventional memory, which is somewhat faster than EMS memory
because it allows 64 KB handles. Also, Galawar simplified its requirements
because it would have wanted the EMM386 driver installed too, which can cause
real trouble in interaction with XMS memory. By the way, XMS memory can have
handle sizes up to 16 MB, in increments of 32 KB!
Galawar hates Windows of any version because it uses too much processor
time(25% up to 50%) and because it uses too much memory. If you run Windows
in 386 Enhanced mode be careful because the memory might be in a page file and
Galawar could slow down a lot. Use DOS instead!(THIS DOESN'T REALLY MATTER
ON A PENTIUM OR PENTIUM II/III PROCESSOR).
So, now I hope you know what protected mode is and why Galawar needs the
386 processor. You can impress your parents with this as well as your computer
teacher!