102 lines
8.0 KiB
Plaintext
102 lines
8.0 KiB
Plaintext
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="generator" content="TempleOS V5.03">
|
||
|
<meta name="viewport" content="width=device-width">
|
||
|
<link rel="stylesheet" href="/style/templeos.css">
|
||
|
<script src="/script/templeos.js"></script>
|
||
|
<style type="text/css">
|
||
|
.cF0{color:#000000;background-color:#ffffff;}
|
||
|
.cF1{color:#0000aa;background-color:#ffffff;}
|
||
|
.cF2{color:#00aa00;background-color:#ffffff;}
|
||
|
.cF3{color:#00aaaa;background-color:#ffffff;}
|
||
|
.cF4{color:#aa0000;background-color:#ffffff;}
|
||
|
.cF5{color:#aa00aa;background-color:#ffffff;}
|
||
|
.cF6{color:#aa5500;background-color:#ffffff;}
|
||
|
.cF7{color:#aaaaaa;background-color:#ffffff;}
|
||
|
.cF8{color:#555555;background-color:#ffffff;}
|
||
|
.cF9{color:#5555ff;background-color:#ffffff;}
|
||
|
.cFA{color:#55ff55;background-color:#ffffff;}
|
||
|
.cFB{color:#55ffff;background-color:#ffffff;}
|
||
|
.cFC{color:#ff5555;background-color:#ffffff;}
|
||
|
.cFD{color:#ff55ff;background-color:#ffffff;}
|
||
|
.cFE{color:#ffff55;background-color:#ffffff;}
|
||
|
.cFF{color:#ffffff;background-color:#ffffff;}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<pre id="content">
|
||
|
<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
|
||
|
<a name="l4"></a>simultaneously because there is <blink>no file sharing/locking mechanism</blink>. Generally,
|
||
|
<a name="l5"></a>the last write wins.
|
||
|
<a name="l6"></a>
|
||
|
<a name="l7"></a>* When using </span><span class=cF2>FAT32</span><span class=cF0>, TempleOS does not generate unique short-entry names, the
|
||
|
<a name="l8"></a>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 valid TempleOS names and it will
|
||
|
<a name="l9"></a>complain. Do not access </span><span class=cF2>FAT32</span><span class=cF0> drives not dedicated to TempleOS. Disable them
|
||
|
<a name="l10"></a>with </span><a href="/Wb/Kernel/BlkDev/DskAddDev.HC.HTML#l170"><span class=cF4>DrvEnable</span></a><span class=cF0>(OFF), or they will generate error messages. </span><span class=cF2>FAT32</span><span class=cF0> involves a
|
||
|
<a name="l11"></a>long and short name for each file.
|
||
|
<a name="l12"></a>
|
||
|
<a name="l13"></a>* The stk does not grow because virtual mem is not used. I recommend allocating
|
||
|
<a name="l14"></a>large local vars from the heap. You can change </span><a href="/Wb/Kernel/KernelA.HH.HTML#l2843"><span class=cF4>MEM_DFT_STK</span></a><span class=cF0> and recompile </span><span class=cF2>Kernel</span><span class=cF0>
|
||
|
<a name="l15"></a>or request more when doing a </span><a href="/Wb/Kernel/KTask.HC.HTML#l242"><span class=cF4>Spawn</span></a><span class=cF0>().
|
||
|
<a name="l16"></a>
|
||
|
<a name="l17"></a>* The syntax highlighting occassionally glitches. The compiler doesn't.
|
||
|
<a name="l18"></a>
|
||
|
<a name="l19"></a>* Call </span><a href="/Wb/Kernel/BlkDev/DskDrv.HC.HTML#l237"><span class=cF4>DskChg</span></a><span class=cF0>() when you insert a new removable media.
|
||
|
<a name="l20"></a>
|
||
|
<a name="l21"></a>* Accessing CD/DVD's is flacky. Try </span><a href="/Wb/Kernel/BlkDev/DskDrv.HC.HTML#l263"><span class=cF4>Drv</span></a><span class=cF0>() or </span><a href="/Wb/Kernel/BlkDev/DskDrv.HC.HTML#l237"><span class=cF4>DskChg</span></a><span class=cF0>() twice.
|
||
|
<a name="l22"></a>
|
||
|
<a name="l23"></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
|
||
|
<a name="l24"></a>binds a HolyC definition to a asm sym. This, too, can only be done once.
|
||
|
<a name="l25"></a>
|
||
|
<a name="l26"></a>* A terminal task has a </span><a href="/Wb/Kernel/KernelA.HH.HTML#l1367"><span class=cF4>CDoc</span></a><span class=cF0> document structure that remains active even when
|
||
|
<a name="l27"></a>you change </span><span class=cF4>Fs->draw_it</span><span class=cF0>. To prevent links in the </span><a href="/Wb/Kernel/KernelA.HH.HTML#l1367"><span class=cF4>CDoc</span></a><span class=cF0> from being activated when
|
||
|
<a name="l28"></a>the user clicks in the window, do one of three things:
|
||
|
<a name="l29"></a>
|
||
|
<a name="l30"></a> A) </span><a href="/Wb/Adam/DolDoc/DocRecalcLib.HC.HTML#l107"><span class=cF4>DocBottom</span></a><span class=cF0>() followed by </span><a href="/Wb/Adam/DolDoc/DocRecalcLib.HC.HTML#l120"><span class=cF4>DocClear</span></a><span class=cF0>() to clear the </span><a href="/Wb/Kernel/KernelA.HH.HTML#l1367"><span class=cF4>CDoc</span></a><span class=cF0> so it has no active
|
||
|
<a name="l31"></a> widgets.
|
||
|
<a name="l32"></a>
|
||
|
<a name="l33"></a> B) Disable window mgr bttn click checking with </span><span class=cF4>Fs->win_inhibit</span><span class=cF0> set to mask </span><span class=cF4>
|
||
|
<a name="l34"></a> </span><a href="/Wb/Kernel/KernelA.HH.HTML#l1421"><span class=cF4>WIF_SELF_MS_L</span></a><span class=cF0>|</span><a href="/Wb/Kernel/KernelA.HH.HTML#l1435"><span class=cF4>WIF_FOCUS_TASK_MS_L_D</span></a><span class=cF0>|</span><a href="/Wb/Kernel/KernelA.HH.HTML#l1423"><span class=cF4>WIF_SELF_MS_R</span></a><span class=cF0>|</span><a href="/Wb/Kernel/KernelA.HH.HTML#l1437"><span class=cF4>WIF_FOCUS_TASK_MS_R_D</span></a><span class=cF0>. This
|
||
|
<a name="l35"></a> inhibits window mgr operations but still generates messages from bttn clicks.
|
||
|
<a name="l36"></a>
|
||
|
<a name="l37"></a>* </span><span class=cF2>switch/case</span><span class=cF0> stmts alloc a single jump table--do not use with wide, sparse
|
||
|
<a name="l38"></a>ranges of case values.
|
||
|
<a name="l39"></a>
|
||
|
<a name="l40"></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="l41"></a>
|
||
|
<a name="l42"></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
|
||
|
<a name="l43"></a>worth slowing-down the compiler to handle this case.)
|
||
|
<a name="l44"></a>
|
||
|
<a name="l45"></a>* </span><a href="/Wb/Kernel/KernelB.HH.HTML#l169"><span class=cF4>MemCpy</span></a><span class=cF0>() only goes fwd.
|
||
|
<a name="l46"></a>
|
||
|
<a name="l47"></a>* A </span><a href="/Wb/Kernel/BlkDev/DskDirB.HC.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
|
||
|
<a name="l48"></a>is because the preprocessor processes the next token ahead.
|
||
|
<a name="l49"></a>
|
||
|
<a name="l50"></a>* The assembler's error msgs are often off by a line and undefines are cryptic.
|
||
|
<a name="l51"></a>
|
||
|
<a name="l52"></a>* The last semicolon on the cmd line is converted to a dbl semicolon because the
|
||
|
<a name="l53"></a>compiler looks ahead before doing a cmd. This normally has no negative effect,
|
||
|
<a name="l54"></a>but when entering </span><span class=cF2>if</span><span class=cF0> stmts with </span><span class=cF2>else</span><span class=cF0> clauses it presents problems.
|
||
|
<a name="l55"></a>
|
||
|
<a name="l56"></a>* You can do a </span><span class=cF2>class</span><span class=cF0> fwd reference by using </span><span class=cF2>extern</span><span class=cF0> on the first declaration, but
|
||
|
<a name="l57"></a>you can only do ptr references to the </span><span class=cF2>class</span><span class=cF0>.
|
||
|
<a name="l58"></a>
|
||
|
<a name="l59"></a>* When doing something like
|
||
|
<a name="l60"></a></span><span class=cF2> U0 Main()
|
||
|
<a name="l61"></a> {
|
||
|
<a name="l62"></a> U16 *_w=0xA0000;
|
||
|
<a name="l63"></a> *_w|=0x8000;
|
||
|
<a name="l64"></a> }
|
||
|
<a name="l65"></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> inst resulting in a </span><span class=cF2>U32</span><span class=cF0> access instead of a </span><span class=cF2>
|
||
|
<a name="l66"></a> U16</span><span class=cF0> access. This affects some hardware operations.
|
||
|
<a name="l67"></a>
|
||
|
<a name="l68"></a>* Compiler warning or error message line numbers will be off if you have a block
|
||
|
<a name="l69"></a>of word-wrapped comments. You might press </span><span class=cF2><CTRL-t></span><span class=cF0> before doing an editor
|
||
|
<a name="l70"></a>goto-line-number command.
|
||
|
</span></pre></body>
|
||
|
</html>
|