ZealOS/docs/Doc/Quirks.DD.html

90 lines
8.6 KiB
HTML
Raw Normal View History

2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V0.13">
2021-07-03 05:07:57 +01:00
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
2021-07-03 05:07:57 +01:00
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF5> Quirks</span><span class=cF0>
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
<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#l195"><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.
2021-07-03 05:07:57 +01:00
<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 vars from the
<a name="l11"></a>heap. You can change </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l3537"><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>().
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
<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 sym. This,
<a name="l20"></a>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:
2021-07-03 05:07:57 +01:00
<a name="l24"></a>
<a name="l25"></a> A) </span><a href="https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocRecalcLib.CC.html#l121"><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#l135"><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.
2021-07-03 05:07:57 +01:00
<a name="l26"></a>
<a name="l27"></a> B) Disable window mgr bttn 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.
2021-07-03 05:07:57 +01:00
<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
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
<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 ptr references to the </span><span class=cF2>cla
<a name="l48"></a>ss</span><span class=cF0>.
2021-07-03 05:07:57 +01:00
<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
2021-07-03 05:07:57 +01:00
<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.
2021-07-03 05:07:57 +01:00
</span></pre></body>
</html>