<a name="l11"></a>Simplicity is a goal to </span><a href="https://tomawezome.github.io/ZealOS/Doc/Strategy.html#l1"><span class=cF4>keep the line count down</span></a><span class=cF0>, so it's easy to tinker with. As it turns-out, simplicity makes it faster in
<a name="l13"></a>similar things which boost speed. It's only 80,849 lines of code including the kernel, the 64-bit compiler, the graphics
<a name="l14"></a>library and all the tools. More importantly, it's designed to keep the user's line count down -- you can do a </span><a href="https://tomawezome.github.io/ZealOS/Doc/HelloWorld.html#l1"><span class=cF4>Hello World</span></a><span class=cF0>
<a name="l20"></a>ZealOS. See the </span><a href="https://tomawezome.github.io/ZealOS/Doc/Charter.html#l1"><span class=cF4>ZealOS Charter</span></a><span class=cF0>.
<a name="l22"></a>Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to
<a name="l61"></a>Two things to know about ZealOS are that <u>tasks</u> have </span><a href="https://tomawezome.github.io/ZealOS/Kernel/Memory/MAllocFree.html#l391"><span class=cF4>MAlloc</span></a><span class=cF0>/</span><a href="https://tomawezome.github.io/ZealOS/Kernel/Memory/MAllocFree.html#l387"><span class=cF4>Free</span></a><span class=cF0> heap memory, not applications, and tasks have compiler symbol
<a name="l64"></a>With </span><span class=cF2>ZealOS</span><span class=cF0>, the command line feeds right into the </span><a href="https://tomawezome.github.io/ZealOS/Doc/CosmiC.html#l1"><span class=cF4>CosmiC</span></a><span class=cF0> compiler, line by line, and it places code into memory it </span><a href="https://tomawezome.github.io/ZealOS/Kernel/Memory/MAllocFree.html#l391"><span class=cF4>MAlloc</span></a><span class=cF0>()s.
<a name="l65"></a>The compiler is paused at the command line, waiting for input. Naturally, you </span><span class=cF2>#include</span><span class=cF0> a program to load it into memory and,
<a name="l68"></a>During the boot process, many files get </span><a href="https://tomawezome.github.io/ZealOS/StartOS.html#l1"><span class=cF4>compiled</span></a><span class=cF0> before you have access to the command line. (Don't worry, booting takes only
<a name="l70"></a>without needing to </span><span class=cF2>#include </span><span class=cF0>them. Everything is truly compiled to native </span><a href="http://en.wikipedia.org/wiki/Amd64#AMD64"><span class=cF2>x86_64</span></a><span class=cF0> machine code, nothing is </span><span class=cF2>interpreted</span><span class=cF0> and there
<a name="l73"></a>Statements at the global scope -- outside the scope of functions -- execute immediately. There is no </span><span class=cF2>main()</span><span class=cF0> function. Inst
<a name="l74"></a>ead, you give meaningful names to what would be </span><span class=cF2>main()</span><span class=cF0> functions and you invoke them by calling them with a statement in the
<a name="l75"></a>global scope, usually at the bottom of your file.
<a name="l76"></a>
<a name="l77"></a>Terry Davis started with </span><span class=cF2>C</span><span class=cF0> syntax, but didn't like the command line for a directory listing looking like this:
<a name="l89"></a>The syntax change created an ambiguity when specifying function addresses, like for calling </span><a href="https://tomawezome.github.io/ZealOS/Kernel/QuickSort.html#l99"><span class=cF4>QuickSort</span></a><span class=cF0>(). To resolve it, I
<a name="l90"></a>made a '</span><span class=cF2>&</span><span class=cF0>' required in front of function names when specifying an address of a function, which is better anyway.
<a name="l92"></a>Once Terry was no longer using standard C/C++ syntax, he decided to change everything he didn't like and call it </span><a href="https://tomawezome.github.io/ZealOS/Doc/CosmiC.html#l1"><span class=cF4>HolyC</span></a><span class=cF0>. Here are
<a name="l93"></a>the new </span><a href="https://tomawezome.github.io/ZealOS/Doc/CosmiC.html#l209"><span class=cF4>operator precedence</span></a><span class=cF0> rules. It's Biblical! See </span><a href="http://www.biblegateway.com/verse/en/Luke+5:37"><span class=cF4>Luke 5:37</span></a><span class=cF0>.
<a name="l95"></a>There are no object files in ZealOS and, normally, you don't make executable files either, but you can. That's known as </span><span class=cF4>
<a name="l99"></a>swap-out. (Swapping tasks takes half a microsecond and does not involve disk activity or memory maps.) See </span><a href="https://tomawezome.github.io/ZealOS/Kernel/Sched.html#l1"><span class=cF4>Scheduler</span></a><span class=cF0>. Polling
<a name="l101"></a>the tasks in the queue determines front-to-back window order.
<a name="l102"></a>
<a name="l103"></a>The </span><span class=cF2>FAT32</span><span class=cF0> filesystem is supported to makes exchanging files with a dual booted other operating system easy and there is the
<a name="l104"></a>simple, 64-bit ZealOS </span><a href="https://tomawezome.github.io/ZealOS/Doc/RedSea.html#l1"><span class=cF4>RedSea</span></a><span class=cF0> filesystem. The </span><a href="https://tomawezome.github.io/ZealOS/Doc/RedSea.html#l1"><span class=cF4>RedSea</span></a><span class=cF0> has allocation bitmap for clus and all files are stored contiguously. You
<a name="l107"></a>ZealOS is geared toward reading and writing whole files. There is support for direct block random access into files, however -- </span><span class=cF4>
<a name="l110"></a>There is no </span><span class=cF2>PATH</span><span class=cF0>, but parent directories are searched when a file is not found. This feature is especially useful for default
<a name="l116"></a>multicore is primarily putting graphics on the screen. Hardware graphics acceleration is not used, so this is possible. See </span><span class=cF4>
<a name="l119"></a>There is no distinction between the terms </span><span class=cF2>task</span><span class=cF0>, </span><span class=cF2>process</span><span class=cF0> or </span><span class=cF2>thread</span><span class=cF0>. All have a task record, </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l3939"><span class=cF4>CTask</span></a><span class=cF0>, pointed to by the </span><span class=cF2>FS</span><span class=cF0> segment
<a name="l120"></a>reg and are accessed with </span><span class=cF4>Fs-></span><span class=cF0> while </span><span class=cF4>Gs-></span><span class=cF0> points to a </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l4058"><span class=cF4>CCPU</span></a><span class=cF0> for the current CPU core. Each task can have just one window, but a
<a name="l121"></a>task can have children with windows. (The segment regs are just used as extra regs -- there is nothing segmented about ZealOS'
<a name="l122"></a>memory.) It is approximately the case that </span><span class=cF2>ZealOS</span><span class=cF0> is multi-threading, single-processing.
<a name="l124"></a>In </span><span class=cF2>ZealOS</span><span class=cF0>, </span><a href="https://tomawezome.github.io/ZealOS/Doc/Glossary.html#l154"><span class=cF4>System Task</span></a><span class=cF0> refers to the father of all tasks. He's never supposed to die. Since tasks inherit the symbols of
<a name="l125"></a>parents, system-wide stuff is associated with </span><span class=cF2>System</span><span class=cF0>. His heap is like kernel memory in other operating systems. Since </span><span class=cF2>System</span><span class=cF0>
<a name="l126"></a>is immortal, it's safe to alloc objects, not tied to any mortal task, from </span><span class=cF2>System</span><span class=cF0>'s heap. He stays in a server mode, taking
<a name="l127"></a>requests, so you can ask him to </span><span class=cF2>#include</span><span class=cF0> something, placing that code system-wide. A funny story is that originally Terry Davis
<a name="l128"></a>called it the </span><span class=cF2>root</span><span class=cF0> task and even had a </span><span class=cF2>/Root</span><span class=cF0> directory :-) </span><span class=cF2>System</span><span class=cF0> executes </span><a href="https://tomawezome.github.io/ZealOS/StartOS.html#l1"><span class=cF4>::/StartOS.CC</span></a><span class=cF0> at boot time.
<a name="l130"></a>For easy back-ups, place everything you author in your </span><span class=cF2>/Home</span><span class=cF0> directory and subdirectories. Then, use </span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/ZDiskA.html#l148"><span class=cF4>CopyTree</span></a><span class=cF0>(). That should
<a name="l131"></a>make upgrading easy, too. Customizable start-up scripts go in your </span><span class=cF2>/Home</span><span class=cF0> directory. The default start-up scripts are in the
<a name="l132"></a>root directory. Copy the start-up files you wish to customize into </span><span class=cF2>/Home</span><span class=cF0> and modify them. See </span><a href="https://tomawezome.github.io/ZealOS/Doc/GuideLines.html#l30"><span class=cF4>Home Files</span></a><span class=cF0>. You can make your
<a name="l133"></a>own distro that includes everything and is a bootable live CD with </span><a href="https://tomawezome.github.io/ZealOS/Misc/DoDistro.html#l1"><span class=cF4>::/Misc/DoDistro.CC</span></a><span class=cF0>.
<a name="l135"></a>Typically, your usage pattern through the day will be repeatedly left or right clicking on filenames in a cmd line </span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirB.html#l120"><span class=cF4>Dir</span></a><span class=cF0>()
<a name="l136"></a>listing. You left-click files to edit them and right-click to </span><span class=cF2>#include</span><span class=cF0> them. To begin a project, type </span><a href="https://tomawezome.github.io/ZealOS/System/DolDoc/DocEd.html#l228"><span class=cF4>Ed</span></a><span class=cF0>("filename");,
<a name="l137"></a>supplying a filename. You can also run programs with </span><span class=cF2><F5></span><span class=cF0> when in the editor. </span><span class=cF2><ESC></span><span class=cF0> to save and exit the file. You'll need
<a name="l138"></a>to do a new </span><a href="https://tomawezome.github.io/ZealOS/Kernel/BlkDev/DiskDirB.html#l120"><span class=cF4>Dir</span></a><span class=cF0>() cmd, periodically, so make a macro on your PersonalMenu. Access your PersonalMenu by pressing </span><span class=cF2><CTRL-m></span><span class=cF0>,
<a name="l139"></a>cursoring until you are on top of it and pressing </span><span class=cF2><SPACE></span><span class=cF0>.
<a name="l140"></a>
<a name="l141"></a></span><span class=cF2><CTRL-t></span><span class=cF0> toggles plain text mode, showing format commands, a little like viewing html code.
<a name="l142"></a></span><span class=cF2><CTRL-l></span><span class=cF0> inserts a text widgets.
<a name="l143"></a></span><span class=cF2><CTRL-r></span><span class=cF0> inserts or edit a graphic sprite resource at cursor location.
<a name="l144"></a></span><span class=cF2><CTRL-d></span><span class=cF0> brings-up the file manager. It's pretty crappy. Terry found he didn't need it very often, believe it or not.
<a name="l152"></a>The </span><span class=cF2>ALT</span><span class=cF0> keys are defined in </span><a href="https://tomawezome.github.io/ZealOS/Home/HomeKeyPlugIns.html#l1"><span class=cF4>~/HomeKeyPlugIns.CC</span></a><span class=cF0>. You can customize them.
<a name="l158"></a></span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.html#l166"><span class=cF4>Find</span></a><span class=cF0>() is your best friend. There's a wrapper function called </span><a href="https://tomawezome.github.io/ZealOS/Home/HomeWrappers.html#l8"><span class=cF4>F</span></a><span class=cF0>() in your </span><span class=cF2>~/HomeWrappers.CC</span><span class=cF0> file. Feel free to make wrapper
<a name="l159"></a>functions for functions you use often and customize the args. By the way, </span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.html#l166"><span class=cF4>Find</span></a><span class=cF0>() or </span><a href="https://tomawezome.github.io/ZealOS/Home/HomeWrappers.html#l13"><span class=cF4>R</span></a><span class=cF0>() can be used to replace strings across
<a name="l160"></a>multiple files. You can access </span><a href="https://tomawezome.github.io/ZealOS/System/Utils/Find.html#l166"><span class=cF4>Find</span></a><span class=cF0>() using </span><span class=cF2><CTRL-SHIFT-f></span><span class=cF0>.
<a name="l162"></a>As you browse code, use the </span><span class=cF2>AutoComplete</span><span class=cF0> window to look-up functions, etc. </span><span class=cF2><CTRL-SHIFT-F1></span><span class=cF0> (or whatever number) to follow a sym
<a name="l165"></a>Use the </span><a href="https://tomawezome.github.io/ZealOS/Doc/HelpIndex.html#l1"><span class=cF4>Help & Index</span></a><span class=cF0> or </span><a href="https://tomawezome.github.io/ZealOS/Doc/DemoIndex.html#l1"><span class=cF4>Demo Index</span></a><span class=cF0> to find-out what exists. Press </span><span class=cF2><F1></span><span class=cF0> for help or use the links on your menu (</span><span class=cF2><CTRL-m></span><span class=cF0>). Also
<a name="l166"></a>, look in the </span><span class=cF2>/Demo</span><span class=cF0> or </span><span class=cF2>/Apps</span><span class=cF0> directories for inspiration.
<a name="l168"></a>Software is distributed as </span><a href="https://tomawezome.github.io/ZealOS/Doc/RedSea.html#l1"><span class=cF4>RedSea</span></a><span class=cF0> ISO files. Burn a CD/DVD, or set your CD/DVD in </span><span class=cF2>QEMU</span><span class=cF0>, </span><span class=cF2>VMware</span><span class=cF0> or </span><span class=cF2>VirtualBox</span><span class=cF0> to the ISO file.
<a name="l169"></a>Then, access the </span><span class=cF2>'T'</span><span class=cF0> drive. Or, </span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/Mount.html#l235"><span class=cF4>Mount</span></a><span class=cF0>() the ISO.C file and access the </span><span class=cF2>'M'</span><span class=cF0> drive in ZealOS. It must be a contiguous ISO.C file,
<a name="l173"></a>whole </span><span class=cF2>'C'</span><span class=cF0> drive can be copied quickly to </span><span class=cF2>'D'</span><span class=cF0>. Also, the </span><a href="https://tomawezome.github.io/ZealOS/System/BlkDev/FileMgr.html#l678"><span class=cF4>FileMgr</span></a><span class=cF0>() </span><span class=cF2><CTRL-d></span><span class=cF0> starts too slowly when there are lots of hard drive
<a name="l176"></a>3rd party libraries are banned, since they circumvent the 100,000 line of code limit in the </span><a href="https://tomawezome.github.io/ZealOS/Doc/Charter.html#l1"><span class=cF4>ZealOS Charter</span></a><span class=cF0>. All applications