<a name="l1"></a><span class=cF5> Booting A PC</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a>TempleOS only supports traditional </span><span class=cF2>BIOS</span><span class=cF0> booting, not the newer technique, </span><span class=cF2>UEFI</span><span class=cF0>.
<a name="l6"></a>When you turn-on (power-up) a computer or you do a hardware reset, the computer
<a name="l7"></a>starts executing the </span><span class=cF2>BIOS</span><span class=cF0>. Sometimes, you must change the </span><span class=cF2>BIOS</span><span class=cF0> boot order to
<a name="l8"></a>boot the device you want.
<a name="l9"></a>
<a name="l10"></a>The </span><span class=cF2>BIOS</span><span class=cF0> loads a boot sector from CD/DVD, hard disk or whatever. The boot
<a name="l11"></a>sector runs in 16-bit real mode and often loads-in a second file that's bigger
<a name="l12"></a>if it can't be done by just one sector. It's a safe bet that boot sectors are
<a name="l13"></a>hand-coded assembly language. Most boot sectors use the </span><span class=cF2>BIOS</span><span class=cF0> to load-in the
<a name="l14"></a>next stage.
<a name="l15"></a>
<a name="l16"></a>Not only do boot sectors have a size limit, 512 bytes or 2048 bytes for CD/DVD,
<a name="l17"></a>the files they load have to fit within 640K because they run in 16-bit mode.
<a name="l18"></a>This means they usually can't just load the whole operating system and start it
<a name="l19"></a>running. Some boot loaders, like Grub, have a capability of switching modes
<a name="l20"></a>before handing-off control to the operating system. The operating system must
<a name="l21"></a>load the rest of itself. With TempleOS, the </span><a href="/Wb/Kernel/Kernel.PRJ.HTML#l1"><span class=cF4>::/Kernel.BIN.C</span></a><span class=cF0> file is loaded by
<a name="l22"></a>the boot sector. I try to put a minimum in the </span><a href="/Wb/Kernel/Kernel.PRJ.HTML#l1"><span class=cF4>Kernel Module</span></a><span class=cF0>, so that it will
<a name="l30"></a></span><a href="/Wb/Adam/Opt/Boot/BootDVDIns.HC.HTML#l1"><span class=cF4>BootDVDIns.HC</span></a><span class=cF0> Prep for CD/DVD install by creating </span><span class=cF2>/0000Boot/0000Kernel.BIN.C</span><span class=cF0>.
<a name="l31"></a>If you are curious about CD/DVDs, see </span><a href="/Wb/Adam/Opt/Boot/DskISORedSea.HC.HTML#l1"><span class=cF4>DskISORedSea.HC</span></a><span class=cF0>. To make a custom
<a name="l32"></a>bootable CD/DVD, look here </span><a href="/Wb/Misc/DoDistro.HC.HTML#l1"><span class=cF4>Bootable CD</span></a><span class=cF0>.
<a name="l37"></a></span><span class=cF2>BootMHD</span><span class=cF0> goes on block zero. </span><span class=cF2>/0000Boot/BootMHD2.BIN.C</span><span class=cF0> is stored as a file in a
<a name="l38"></a>partition, risky and unusual, since most master boot loaders place stage 2 in a
<a name="l39"></a>gap that's not in any partition. </span><span class=cF2>BootMHD2</span><span class=cF0> displays a menu and boots a
<a name="l50"></a>with a new TempleOS kernel, you must create a </span><a href="/Wb/Kernel/Kernel.PRJ.HTML#l1"><span class=cF4>::/Kernel.BIN.C</span></a><span class=cF0> binary file and
<a name="l55"></a>With TempleOS, </span><a href="/Wb/Kernel/Kernel.PRJ.HTML#l1"><span class=cF4>::/Kernel.BIN.C</span></a><span class=cF0> loads </span><a href="/Wb/Compiler/Compiler.PRJ.HTML#l1"><span class=cF4>::/Compiler/Compiler.BIN</span></a><span class=cF0> so it can work
<a name="l57"></a></span><a href="/Wb/StartOS.HC.HTML#l1"><span class=cF4>::/StartOS.HC</span></a><span class=cF0> into the </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0>'s memory including the code in the </span><span class=cF2>/Adam</span><span class=cF0> and </span><span class=cF2>/H
<a name="l61"></a>this when working on </span><a href="/Wb/Kernel/Kernel.PRJ.HTML#l1"><span class=cF4>::/Kernel.BIN.C</span></a><span class=cF0> or your start-up scripts when you want to
<a name="l62"></a>compile them effect. See </span><a href="/Wb/Adam/Opt/Boot/BootRAM.HC.HTML#l33"><span class=cF4>BootRAM</span></a><span class=cF0>().