+dictionary, this is special list that contain names of compiled
+modules, variables etc. and they locations in core. Constants use
+dictionary space only. Random word can be removed from dictionary at
+any time. Currently dictionary can contain at most 1000 entries.
+</p>
+</div>
+<div id="outline-container-org77ca4ba" class="outline-3">
+<h3 id="org77ca4ba"><span class="section-number-3">9.1.</span> Dictionary entry format</h3>
+<div class="outline-text-3" id="text-9-1">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col class="org-right" />
+
+<col class="org-right" />
+
+<col class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-right">offset</th>
+<th scope="col" class="org-right">length</th>
+<th scope="col" class="org-left">description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-right">0</td>
+<td class="org-right">4</td>
+<td class="org-left">0 &lt; previous entry</td>
+</tr>
+
+<tr>
+<td class="org-right"> </td>
+<td class="org-right"> </td>
+<td class="org-left">0 = last</td>
+</tr>
+
+<tr>
+<td class="org-right"> </td>
+<td class="org-right"> </td>
+<td class="org-left">-1 = empty</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td class="org-right">4</td>
+<td class="org-right">15</td>
+<td class="org-left">module name string</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td class="org-right">19</td>
+<td class="org-right">1</td>
+<td class="org-left">entry type</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td class="org-right">20</td>
+<td class="org-right">4</td>
+<td class="org-left">entry data</td>
+</tr>
+</tbody>
+</table>
+
+<p>
+Core headers as linked list of module names make up something like
+dictionary. When some entry address is needed compiler can quickly
+run through headers backwards and find needed entry.
+</p>
+</div>
+</div>
+<div id="outline-container-orga2a22a5" class="outline-3">
+<h3 id="orga2a22a5"><span class="section-number-3">9.2.</span> Possible module types</h3>
+<div class="outline-text-3" id="text-9-2">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col class="org-right" />
+
+<col class="org-left" />
+
+<col class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-right">type</th>
+<th scope="col" class="org-left">description</th>
+<th scope="col" class="org-left">"execute" action</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-right">0</td>
+<td class="org-left">data</td>
+<td class="org-left">compile "num" instruction</td>
+</tr>
+
+<tr>
+<td class="org-right"> </td>
+<td class="org-left"> </td>
+<td class="org-left">with address to module</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td class="org-right">1</td>
+<td class="org-left">submodule</td>
+<td class="org-left">compile "call" instruction</td>
+</tr>
+
+<tr>
+<td class="org-right"> </td>
+<td class="org-left"> </td>
+<td class="org-left">with address to module</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td class="org-right">2</td>
+<td class="org-left">imm. submodule</td>
+<td class="org-left">immediately call to module</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div id="outline-container-org6b34748" class="outline-3">
+<h3 id="org6b34748"><span class="section-number-3">9.3.</span> Memory map</h3>
+<div class="outline-text-3" id="text-9-3">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col class="org-right" />
+
+<col class="org-left" />
+
+<col class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-right">location</th>
+<th scope="col" class="org-left">size</th>
+<th scope="col" class="org-left">description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-right">0</td>
+<td class="org-left">~4096</td>
+<td class="org-left">core</td>
+</tr>
+
+<tr>
+<td class="org-right">1500000</td>
+<td class="org-left">~32000</td>
+<td class="org-left">highlevel Fifth boot code</td>
+</tr>
+
+<tr>
+<td class="org-right">200000h</td>
+<td class="org-left"> </td>
+<td class="org-left">core startup messages area</td>
+</tr>
+
+<tr>
+<td class="org-right">5200000</td>
+<td class="org-left"> </td>
+<td class="org-left">end of dynamic memory space</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div id="outline-container-org835c31e" class="outline-2">
+<h2 id="org835c31e"><span class="section-number-2">10.</span> Dynamically loadable modules</h2>
+<div class="outline-text-2" id="text-10">
+</div>
+<div id="outline-container-orgd31a968" class="outline-3">
+<h3 id="orgd31a968"><span class="section-number-3">10.1.</span> Keyboard driver</h3>
+<div class="outline-text-3" id="text-10-1">
+<p class="verse">
+<br />
+KBD_@ ( – code ) get scancodes for pressed keys from keyboard.<br />
+KBD_down? ( key – result ) check is key with specified scancode<br />
+                currently pressed down.<br />
+KBD_SC2FSCII ( code – FSCII ) convert key scancode into FSCII code,<br />
+                or in FSK (Fifth standard keycode).<br />
+KBD_F@ ( – FSCII ) read pressed key FSCII or FSK, returns -1 if no<br />
+                keys are pressed.<br />
+KBD_FW@ ( – FSCII ) read pressed key FSCII or FSK, if no keys is<br />
+                are pressed then waits until there is.<br />
+<br />
+                FSK<br />
+                —<br />
+In HEX.<br />
+<br />
+FC backspace<br />
+FD TAB<br />
+FE enter<br />
+FF space<br />
+<br />
+400 ESC<br />
+401 … F1 …<br />
+410 up<br />
+411 right<br />
+412 down<br />
+413 left<br />
+414 INS<br />
+415 DEL<br />
+416 home<br />
+417 end<br />
+418 PG/UP<br />
+419 PG/DN<br />
+</p>
+</div>
+</div>
+<div id="outline-container-orgc5f8a76" class="outline-3">
+<h3 id="orgc5f8a76"><span class="section-number-3">10.2.</span> Mouse driver</h3>
+<div class="outline-text-3" id="text-10-2">
+<p class="verse">
+mousex var Mouse x coordinate.<br />
+mousey var Mouse y coordinate.<br />
+mousekeyl var Mouse left key.<br />
+mousekeym var Mouse middle key.<br />
+mousekeyr var Mouse right key.<br />
+mousec var Display current mouse coordinates in top left part of screen,<br />
+                if true. (good for debugging)<br />
+mousepointer var Image buffer, holding current mouse pointer.<br />
+mouseadd ( ModuleAddr x1 x2 y1 y2 – ) Add specified area on screen,<br />
+                into mause click buffer. If any mouse button is clicked on<br />
+                that area, module at "ModuleAddr" will be executed.<br />
+mousebe var Amount of buffer elements.<br />
+mousedo ( – ) Updates mouse coordinates and keys. Parse mouse<br />
+                click buffer, and draw mouse cursor to "screen".<br />
+</p>
+</div>
+</div>
+<div id="outline-container-org64da03a" class="outline-3">
+<h3 id="org64da03a"><span class="section-number-3">10.3.</span> 2D graphic library</h3>
+<div class="outline-text-3" id="text-10-3">
+<dl class="org-dl">
+<dt>lineh ( color len x y imgbuf – )</dt><dd>draws horisontal line from X,Y
+coordinates to right, with specified length.</dd>
+
+<dt>linev ( color len x y imgbuf – )</dt><dd>draws vertical line down, from
+coordinates X,Y, with specified length.</dd>
+
+<dt>box ( color x2 x1 y2 y1 imgbuf – )</dt><dd><p>
+draws rectangular box. x2
+bust be >= x1, y2 must be >= y1.
+</p>
+
+<pre class="example" id="org0225660">
+x1,y1-----------+
+ | |
+ | |
+ +-----------x2,y2
+</pre></dd>
+
+<dt>flipv ( imgbuf – )</dt><dd>flip image vertically.</dd>
+
+<dt>imgcoltrans ( ImgBuf Color ToColor – )</dt><dd>Translate all pixels in
+specified image with "Color" into "ToColor".</dd>
+
+<dt>imgfill ( color x y imgbuf – )</dt><dd>Fill image region starting at
+location X & Y with specified color.</dd>
+</dl>
+</div>
+</div>
+
+<div id="outline-container-org203890d" class="outline-3">
+<h3 id="org203890d"><span class="section-number-3">10.4.</span> Trigonometry functions</h3>
+<div class="outline-text-3" id="text-10-4">
+</div>
+<div id="outline-container-org618a2c2" class="outline-4">
+<h4 id="org618a2c2"><span class="section-number-4">10.4.1.</span> sin ( a – result )</h4>
+<div class="outline-text-4" id="text-10-4-1">
+<p>
+Return sinus from given angle "a", 360ø is 2000. So 1000 represents
+180ø angle. Result will be in range -10'000 to 10'000, instead of ñ1.
+</p>
+</div>
+</div>
+<div id="outline-container-org0f995cf" class="outline-4">
+<h4 id="org0f995cf"><span class="section-number-4">10.4.2.</span> cos ( a – result )</h4>
+<div class="outline-text-4" id="text-10-4-2">
+<p>
+Return cosinus from given angle. Parameters are like in <a href="#org618a2c2">sin</a> function.
+</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="author">Author: Svjatoslav Agejenko</p>
+<p class="date">Created: 2023-09-18 Mon 01:47</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>