ZealOS/docs/Doc/Quirks.DD.html
TomAwezome 93c19f3f1b Change ProfRep to sort by CPU usage.
Add column headers to Rep functions.
Change MEM_EXTRA_HASH2_PAGS to 1. (Revert this later if it causes bugs.)
2021-10-30 05:12:52 -04:00

89 lines
8.7 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.04">
<style type="text/css">
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF5> Quirks</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a>* You run a risk of problems if you do file operations on the same files simultaneously because there is <blink>no file
<a name="l4"></a>sharing/locking mechanism</blink>. Generally, the last write wins.
<a name="l5"></a>
<a name="l6"></a>* When using </span><span class=cF2>FAT32</span><span class=cF0>, ZealOS does not generate unique short-entry names, the ones with the </span><span class=cF2>~</span><span class=cF0>s. Not all </span><span class=cF2>FAT32</span><span class=cF0> filenames are
<a name="l7"></a>valid ZealOS names and it will complain. Do not access </span><span class=cF2>FAT32</span><span class=cF0> drives not dedicated to ZealOS. Disable them with </span><span class=cF4>
<a name="l8"></a></span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/BlkDev/DiskAddDev.CC.html#l209"><span class=cF4>DriveEnable</span></a><span class=cF0>(OFF), or they will generate error messages. </span><span class=cF2>FAT32</span><span class=cF0> involves a long and short name for each file.
<a name="l9"></a>
<a name="l10"></a>* The stack does not grow because virtual mem is not used. It is recommended that you allocate large local variables from the
<a name="l11"></a>heap. You can change </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l3547"><span class=cF4>MEM_DEFAULT_STACK</span></a><span class=cF0> and recompile </span><span class=cF2>Kernel</span><span class=cF0> or request more when doing a </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KTask.CC.html#l264"><span class=cF4>Spawn</span></a><span class=cF0>().
<a name="l12"></a>
<a name="l13"></a>* The syntax highlighting occassionally glitches. The compiler doesn't.
<a name="l14"></a>
<a name="l15"></a>* Call </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/BlkDev/DiskDrive.CC.html#l269"><span class=cF4>DiskChange</span></a><span class=cF0>() when you insert a new removable media.
<a name="l16"></a>
<a name="l17"></a>* Accessing CD/DVD's is flacky. Try </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/BlkDev/DiskDrive.CC.html#l286"><span class=cF4>Drive</span></a><span class=cF0>() or </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/BlkDev/DiskDrive.CC.html#l269"><span class=cF4>DiskChange</span></a><span class=cF0>() twice.
<a name="l18"></a>
<a name="l19"></a>* You can only </span><span class=cF2>extern</span><span class=cF0> something once. There is a varient called </span><span class=cF2>_extern</span><span class=cF0> which binds a CosmiC definition to a asm symbol. Th
<a name="l20"></a>is, too, can only be done once.
<a name="l21"></a>
<a name="l22"></a>* A terminal task has a </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1502"><span class=cF4>CDoc</span></a><span class=cF0> document structure that remains active even when you change </span><span class=cF4>Fs-&gt;draw_it</span><span class=cF0>. To prevent links in
<a name="l23"></a>the </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1502"><span class=cF4>CDoc</span></a><span class=cF0> from being activated when the user clicks in the window, do one of three things:
<a name="l24"></a>
<a name="l25"></a> A) </span><a href="https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocRecalcLib.CC.html#l122"><span class=cF4>DocBottom</span></a><span class=cF0>() followed by </span><a href="https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocRecalcLib.CC.html#l136"><span class=cF4>DocClear</span></a><span class=cF0>() to clear the </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1502"><span class=cF4>CDoc</span></a><span class=cF0> so it has no active widgets.
<a name="l26"></a>
<a name="l27"></a> B) Disable window mgr button click checking with </span><span class=cF4>Fs-&gt;win_inhibit</span><span class=cF0> set to mask </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1552"><span class=cF4>WIF_SELF_MS_L</span></a><span class=cF0>|</span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1566"><span class=cF4>WIF_FOCUS_TASK_MS_L_D</span></a><span class=cF0>|</span><span class=cF4>
<a name="l28"></a> </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1554"><span class=cF4>WIF_SELF_MS_R</span></a><span class=cF0>|</span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l1568"><span class=cF4>WIF_FOCUS_TASK_MS_R_D</span></a><span class=cF0>. This inhibits window mgr operations but still generates messages from bttn clicks.
<a name="l29"></a>
<a name="l30"></a>* </span><span class=cF2>switch/case</span><span class=cF0> statements alloc a single jump table--do not use with wide, sparse ranges of case values.
<a name="l31"></a>
<a name="l32"></a>* Don't do a </span><span class=cF2>goto</span><span class=cF0> out of a </span><span class=cF2>try{}</span><span class=cF0>.
<a name="l33"></a>
<a name="l34"></a>* A </span><span class=cF2>goto</span><span class=cF0> label name must not match a global scope object's name. (It's not worth slowing-down the compiler to handle this
<a name="l35"></a>case.)
<a name="l36"></a>
<a name="l37"></a>* </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelB.HH.html#l135"><span class=cF4>MemCopy</span></a><span class=cF0>() only goes forward.
<a name="l38"></a>
<a name="l39"></a>* A </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/BlkDev/DiskDirB.CC.html#l9"><span class=cF4>Cd</span></a><span class=cF0>() cmd must be followed by two semicolons if a </span><span class=cF2>#include</span><span class=cF0> is after it. This is because the preprocessor processes the
<a name="l40"></a>next token ahead.
<a name="l41"></a>
<a name="l42"></a>* The assembler's error messages are often off by a line and undefines are cryptic.
<a name="l43"></a>
<a name="l44"></a>* The last semicolon on the cmd line is converted to a double semicolon because the compiler looks ahead before doing a cmd.
<a name="l45"></a>This normally has no negative effect, but when entering </span><span class=cF2>if</span><span class=cF0> statements with </span><span class=cF2>else</span><span class=cF0> clauses it presents problems.
<a name="l46"></a>
<a name="l47"></a>* You can do a </span><span class=cF2>class</span><span class=cF0> forward reference by using </span><span class=cF2>extern</span><span class=cF0> on the first declaration, but you can only do pointer references to the </span><span class=cF2>
<a name="l48"></a>class</span><span class=cF0>.
<a name="l49"></a>
<a name="l50"></a>* When doing something like
<a name="l51"></a></span><span class=cF2> U0 Main()
<a name="l52"></a> {
<a name="l53"></a> U16 *_w = 0xA0000;
<a name="l54"></a> *_w |= 0x8000;
<a name="l55"></a> }
<a name="l56"></a> </span><span class=cF0>The </span><span class=cF2>|=</span><span class=cF0> will be coded as a </span><span class=cF2>U32 Bts</span><span class=cF0> instruction resulting in a </span><span class=cF2>U32</span><span class=cF0> access instead of a </span><span class=cF2>U16</span><span class=cF0> access. This affects some hardware
<a name="l57"></a> operations.
<a name="l58"></a>
<a name="l59"></a>* Compiler warning or error message line numbers will be off if you have a block of word-wrapped comments. You might press </span><span class=cF2>&lt;C
<a name="l60"></a>TRL-t&gt;</span><span class=cF0> before doing an editor goto-line-number command.
</span></pre></body>
</html>