<a name="l3"></a></span><span class=cF2>/Home</span><span class=cF0> All your user data should be placed in here to ease backing-up your data.
<a name="l4"></a>When you install an application it will create a subdirectory of your </span><span class=cF2>/Home</span><span class=cF0>
<a name="l5"></a>directory for storage.
<a name="l6"></a>
<a name="l7"></a></span><span class=cF2>/Apps</span><span class=cF0> Applications are placed in subdirectories of </span><span class=cF2>/Apps</span><span class=cF0>. Applications should
<a name="l8"></a>have a file called </span><span class=cF2>Install.HC.Z</span><span class=cF0> which will install the app, possibly making
<a name="l9"></a>files or directories in </span><span class=cF2>/Home</span><span class=cF0>. The file, </span><span class=cF2>Load.HC.Z</span><span class=cF0> will load the application
<a name="l10"></a>into mem. The file, </span><span class=cF2>Run.HC.Z</span><span class=cF0>, will usually load and execute the app. To add an
<a name="l11"></a>app to your PersonalMenu, use </span><span class=cF2><CTRL-l></span><span class=cF0>, insert a macro with the PopUp option
<a name="l12"></a>checked and invoke the </span><span class=cF2>Run.HC.Z</span><span class=cF0> file.
<a name="l13"></a>
<a name="l14"></a></span><span class=cF2>/Demo</span><span class=cF0> Here you can find lots of sample code to do various things.
<a name="l15"></a>
<a name="l16"></a></span><span class=cF2>/Doc</span><span class=cF0> Here you can find documentation.
<a name="l17"></a>
<a name="l18"></a></span><span class=cF2>/Kernel</span><span class=cF0> The core of the operating system is found here. Since priviledge levels
<a name="l19"></a>are not used, calling it a </span><span class=cF2>kernel</span><span class=cF0> is deceptive. It is </span><span class=cF2>AOT</span><span class=cF0> compiled by </span><span class=cF4>
<a name="l20"></a></span><a href="/Wb/Adam/Opt/Boot/BootHDIns.HC#l18"><span class=cF4>BootHDIns</span></a><span class=cF0>(). It is loaded by the boot loader and must fit in 640K.
<a name="l22"></a></span><span class=cF2>/Compiler</span><span class=cF0> The compiler module src code is found here. The compiler is </span><span class=cF2>AOT</span><span class=cF0>
<a name="l23"></a>compiled to produce a binary file which is loaded at boot. It, too, is </span><span class=cF2>AOT</span><span class=cF0>
<a name="l26"></a></span><span class=cF2>/Adam</span><span class=cF0> The non-kernel part of the operating system is found here. It is </span><span class=cF2>JIT</span><span class=cF0>
<a name="l27"></a>compiled during boot. The </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0> is the father of all tasks, like Adam and
<a name="l32"></a>CD/DVD </span><a href="/Wb/Kernel/Kernel.PRJ#l1"><span class=cF4>0000Kernel.BIN.C</span></a><span class=cF0> file go here. ASCII </span><span class=cF2>0000</span><span class=cF0> is near the top,
<a name="l39"></a>The home dir is specified with </span><span class=cF2>'~'</span><span class=cF0>. The home dir is </span><span class=cF2>::/Home</span><span class=cF0> unless you change
<a name="l40"></a>it with </span><a href="/Wb/Kernel/BlkDev/DskDirB.HC#l1"><span class=cF4>HomeSet</span></a><span class=cF0>() or compile the kernel with a cfg option. An empty </span><span class=cF2>/Home</span><span class=cF0> dir
<a name="l43"></a></span><a href="/Wb/Home/PersonalMenu.#l1"><span class=cF4>~/PersonalMenu.DD</span></a><span class=cF0> a menu viewed with the </span><span class=cF2><CTRL-m></span><span class=cF0> key or by clicking "</span><span class=cF2>MENU</span><span class=cF0>" in
<a name="l46"></a></span><a href="/Wb/Home/PersonalNotes.#l1"><span class=cF4>~/PersonalNotes.DD</span></a><span class=cF0> a personal note file viewed with the </span><span class=cF2><CTRL-SHIFT-M></span><span class=cF0> key.
<a name="l48"></a></span><a href="/Wb/Home/MakeHome.HC#l1"><span class=cF4>~/MakeHome.HC</span></a><span class=cF0> a file compiled by the </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0> during </span><a href="/Wb/StartOS.HC#l44"><span class=cF4>StartOS</span></a><span class=cF0>.
<a name="l50"></a></span><span class=cF4>~/Home*</span><span class=cF0> Copy </span><span class=cF2>Home*</span><span class=cF0> files from the root into </span><span class=cF2>~</span><span class=cF0> and customize them. These files
<a name="l53"></a></span><a href="/Wb/Home/Once.#l1"><span class=cF4>~/Once.HC</span></a><span class=cF0> a file invoked at the start-up of the first user. Customize this!
<a name="l55"></a></span><a href="/Wb/Home/Registry.HC#l1"><span class=cF4>~/Registry.HC</span></a><span class=cF0> can be edited by hand or deleted to reset to defaults. Takes
<a name="l62"></a>* Place applications in their own </span><span class=cF2>/Apps</span><span class=cF0> subdirectory.
<a name="l63"></a>
<a name="l64"></a>* Make a file called </span><span class=cF2>Load.HC.Z</span><span class=cF0> to load the application.
<a name="l65"></a>
<a name="l66"></a>* Make a file called </span><span class=cF2>Run.HC.Z</span><span class=cF0> to load and run the application, preferable by </span><span class=cF2>#in
<a name="l67"></a>clude</span><span class=cF0>ing the </span><span class=cF2>Load.HC.Z</span><span class=cF0> file.
<a name="l68"></a>
<a name="l69"></a>* Place user data in a subdirectory of </span><span class=cF2>/Home</span><span class=cF0>, preferably naming the subdirectory
<a name="l70"></a>the same as the </span><span class=cF2>/Apps</span><span class=cF0> subdirectory. Or, place data in the </span><span class=cF2>Registry.HC.Z</span><span class=cF0> file.
<a name="l73"></a>* If the app needs files in the </span><span class=cF2>/Home</span><span class=cF0> directory, make an </span><span class=cF2>/Apps</span><span class=cF0> file called </span><span class=cF2>Insta
<a name="l74"></a>ll.HC.Z</span><span class=cF0> or </span><span class=cF2>Install.IN.Z</span><span class=cF0> to create the </span><span class=cF2>/Home</span><span class=cF0> subdirectory.
<a name="l81"></a>stk does not grow, so alloc enough when the task (process) is </span><a href="/Wb/Kernel/KTask.HC#l242"><span class=cF4>Spawn</span></a><span class=cF0>ed and use
<a name="l82"></a>the heap for most things. (The </span><span class=cF2>heap</span><span class=cF0> refers to </span><a href="/Wb/Kernel/Mem/MAllocFree.HC#l387"><span class=cF4>MAlloc</span></a><span class=cF0>() and </span><a href="/Wb/Kernel/Mem/MAllocFree.HC#l383"><span class=cF4>Free</span></a><span class=cF0>().)
<a name="l84"></a>* You can </span><a href="/Wb/Kernel/Mem/MAllocFree.HC#l383"><span class=cF4>Free</span></a><span class=cF0>(</span><span class=cF2>NULL</span><span class=cF0>).
<a name="l88"></a>* There are two modes of compiling, </span><a href="/Wb/Doc/Glossary.DD.HTML#l208"><span class=cF4>AOT Compile Mode</span></a><span class=cF0> and </span><a href="/Wb/Doc/Glossary.DD.HTML#l221"><span class=cF4>JIT Compile Mode</span></a><span class=cF0>.
<a name="l89"></a>Compilation is done in both -- neither is "interpreted". Use </span><a href="/Wb/Doc/Glossary.DD.HTML#l221"><span class=cF4>JIT Mode</span></a><span class=cF0>.
<a name="l111"></a>for a 1 byte signed int -- nothing forces it to </span><span class=cF2>1</span><span class=cF0> or </span><span class=cF2>0</span><span class=cF0>. There is a </span><a href="/Wb/Kernel/KernelB.HH#l119"><span class=cF4>ToBool</span></a><span class=cF0>()
<a name="l112"></a>function that will for to </span><span class=cF2>1</span><span class=cF0> ot </span><span class=cF2>0</span><span class=cF0>, however.
<a name="l113"></a>
<a name="l114"></a>* Glbl vars in </span><span class=cF2>AOT</span><span class=cF0> BIN modules are initialized to zero. They occupy space in
<a name="l115"></a>BIN files.
<a name="l116"></a>
<a name="l117"></a>* Bracketing code with </span><span class=cF2>PUSHFD CLI</span><span class=cF0> and </span><span class=cF2>POPFD</span><span class=cF0> will protect against simultaneous
<a name="l118"></a>accesses from tasks on <u>one</u> core. To protect against multiple cores, you need a
<a name="l119"></a>locked semaphore. I think semiphores need to be in their own cache line, but
<a name="l120"></a>I'm not sure. I use lock bits in a lot of places not aligned.
<a name="l122"></a>* </span><a href="/Wb/Kernel/KMisc.HC#l280"><span class=cF4>SysDbg</span></a><span class=cF0>() and </span><a href="/Wb/Kernel/KMisc.HC#l285"><span class=cF4>IsSysDbg</span></a><span class=cF0>() are really handy when working on the compiler or
<a name="l127"></a>* Use </span><a href="/Wb/Kernel/KernelA.HH#l3456"><span class=cF4>CH_SHIFT_SPACE</span></a><span class=cF0> for spaces in quotes in source code because I run </span><span class=cF4>
<a name="l128"></a></span><a href="/Wb/Adam/Opt/Utils/StrUtils.HC#l201"><span class=cF4>Spaces-to-Tabs</span></a><span class=cF0> on source code.
<a name="l136"></a>* See </span><a href="/Wb/Adam/AHash.HC#l1"><span class=cF4>::/Adam/AHash.HC</span></a><span class=cF0> for examples of how the hash tables are set-up.
<a name="l148"></a>or </span><a href="/Wb/Kernel/Job.HC#l376"><span class=cF4>PopUp</span></a><span class=cF0>() a task to run the application and kill it when it's done.
<a name="l150"></a>* To display the contents of a hash table, use the </span><a href="/Wb/Adam/AHash.HC#l149"><span class=cF4>Who</span></a><span class=cF0>() routine or the
<a name="l151"></a>varients. </span><a href="/Wb/Adam/AHash.HC#l328"><span class=cF4>HashDepthRep</span></a><span class=cF0>() gives a histogram of how long the chains are, in case
<a name="l160"></a>* </span><span class=cF2>FS</span><span class=cF0> must always point to the cur </span><a href="/Wb/Kernel/KernelA.HH#l3271"><span class=cF4>CTask</span></a><span class=cF0>.
<a name="l162"></a>* </span><span class=cF2>GS</span><span class=cF0> must always point to the cur </span><a href="/Wb/Kernel/KernelA.HH#l3391"><span class=cF4>CCPU</span></a><span class=cF0>.
<a name="l171"></a>* I recommend using the standard stk frame for functions because </span><a href="/Wb/Kernel/KDbg.HC#l60"><span class=cF4>Caller</span></a><span class=cF0>() is