Added reference to Bibi-binary
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 17 Apr 2022 15:16:21 +0000 (18:16 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 17 Apr 2022 15:16:21 +0000 (18:16 +0300)
doc/index.html
doc/index.org

index 430d5a6..107188f 100644 (file)
@@ -3,7 +3,7 @@
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<!-- 2021-12-21 T 20:02 -->
+<!-- 2022-04-17 Sun 18:14 -->
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 <meta name="viewport" content="width=device-width, initial-scale=1" />
 <title>Fifth - virtual machine, operating system, programming language</title>
@@ -40,7 +40,7 @@
   }
   pre.src {
     position: relative;
-    overflow: auto;
+    overflow: visible;
     padding-top: 1.2em;
   }
   pre.src:before {
@@ -52,7 +52,7 @@
     padding: 3px;
     border: 1px solid black;
   }
-  pre.src:hover:before { display: inline; margin-top: 14px;}
+  pre.src:hover:before { display: inline;}
   /* Languages per Org manual */
   pre.src-asymptote:before { content: 'Asymptote'; }
   pre.src-awk:before { content: 'Awk'; }
   .org-svg { width: 90%; }
   /*]]>*/-->
 </style>
-<link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
-<style type="text/css">
-footer {background-color: #111 !important;}
-pre {background-color: #111; color: #ccc;}
-</style>
 <link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
 <script type="text/javascript">
-// @license magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt Public Domain
+/*
+@licstart  The following is the entire license notice for the
+JavaScript code in this tag.
+
+Copyright (C) 2012-2020 Free Software Foundation, Inc.
+
+The JavaScript code in this tag is free software: you can
+redistribute it and/or modify it under the terms of the GNU
+General Public License (GNU GPL) as published by the Free Software
+Foundation, either version 3 of the License, or (at your option)
+any later version.  The code is distributed WITHOUT ANY WARRANTY;
+without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
+
+As additional permission under GNU GPL version 3 section 7, you
+may distribute non-source (e.g., minimized or compacted) forms of
+that code without the copy of the GNU GPL normally required by
+section 4, provided you include this license notice and a URL
+through which recipients can access the Corresponding Source.
+
+
+@licend  The above is the entire license notice
+for the JavaScript code in this tag.
+*/
 <!--/*--><![CDATA[/*><!--*/
-     function CodeHighlightOn(elem, id)
-     {
-       var target = document.getElementById(id);
-       if(null != target) {
-         elem.classList.add("code-highlighted");
-         target.classList.add("code-highlighted");
-       }
-     }
-     function CodeHighlightOff(elem, id)
-     {
-       var target = document.getElementById(id);
-       if(null != target) {
-         elem.classList.remove("code-highlighted");
-         target.classList.remove("code-highlighted");
-       }
-     }
-    /*]]>*///-->
-// @license-end
+ function CodeHighlightOn(elem, id)
+ {
+   var target = document.getElementById(id);
+   if(null != target) {
+     elem.cacheClassElem = elem.className;
+     elem.cacheClassTarget = target.className;
+     target.className = "code-highlighted";
+     elem.className   = "code-highlighted";
+   }
+ }
+ function CodeHighlightOff(elem, id)
+ {
+   var target = document.getElementById(id);
+   if(elem.cacheClassElem)
+     elem.className = elem.cacheClassElem;
+   if(elem.cacheClassTarget)
+     target.className = elem.cacheClassTarget;
+ }
+/*]]>*///-->
 </script>
 <script type="text/x-mathjax-config">
     MathJax.Hub.Config({
@@ -253,80 +270,80 @@ pre {background-color: #111; color: #ccc;}
 <h2>Table of Contents</h2>
 <div id="text-table-of-contents">
 <ul>
-<li><a href="#orga1937e0">1. General</a>
+<li><a href="#org53aa659">1. General</a>
 <ul>
-<li><a href="#org4ccb678">1.1. Source code</a></li>
+<li><a href="#org0222a82">1.1. Source code</a></li>
 </ul>
 </li>
-<li><a href="#org02e49e6">2. !Project deprecated!</a></li>
-<li><a href="#orgdc8dd24">3. Introduction</a>
+<li><a href="#org1ba4dab">2. !Project deprecated!</a></li>
+<li><a href="#org27a9291">3. Introduction</a>
 <ul>
-<li><a href="#org040189a">3.1. screenshots</a></li>
+<li><a href="#org7b05666">3.1. screenshots</a></li>
 </ul>
 </li>
-<li><a href="#org3c7b2e9">4. Installation</a></li>
-<li><a href="#org1b662d2">5. Fifth distribution directory tree description</a></li>
-<li><a href="#org1ffd5e0">6. Requirements</a>
+<li><a href="#org5c0e3c1">4. Installation</a></li>
+<li><a href="#org064502d">5. Fifth distribution directory tree description</a></li>
+<li><a href="#orge5e54fa">6. Requirements</a>
 <ul>
-<li><a href="#org83bdd27">6.1. Software</a></li>
-<li><a href="#orgad4b565">6.2. Hardware</a></li>
-<li><a href="#org32cb851">6.3. Human</a></li>
+<li><a href="#org6f95f4b">6.1. Software</a></li>
+<li><a href="#org51eb820">6.2. Hardware</a></li>
+<li><a href="#org5d390fa">6.3. Human</a></li>
 </ul>
 </li>
-<li><a href="#org9413aba">7. Numbers representation within Fifth</a></li>
-<li><a href="#orgebb1600">8. Disk file map, and it's data structures</a>
+<li><a href="#org05c7be5">7. Numbers representation within Fifth</a></li>
+<li><a href="#org06c8993">8. Disk file map, and it's data structures</a>
 <ul>
-<li><a href="#org8ff9302">8.1. Disk allocation</a></li>
-<li><a href="#org022023f">8.2. FAT entry format:</a></li>
-<li><a href="#orgfcf638a">8.3. File entry format</a></li>
+<li><a href="#org84aa87e">8.1. Disk allocation</a></li>
+<li><a href="#org524c276">8.2. FAT entry format:</a></li>
+<li><a href="#org21c233b">8.3. File entry format</a></li>
 </ul>
 </li>
-<li><a href="#orgbd93844">9. Core architecture</a>
+<li><a href="#orga899cc5">9. Core architecture</a>
 <ul>
-<li><a href="#org625be09">9.1. Dictionary entry format</a></li>
-<li><a href="#orged89e76">9.2. Possible module types</a></li>
-<li><a href="#orgd8943d6">9.3. Memory map</a></li>
+<li><a href="#org4df227c">9.1. Dictionary entry format</a></li>
+<li><a href="#org3ba785a">9.2. Possible module types</a></li>
+<li><a href="#org787b6e1">9.3. Memory map</a></li>
 </ul>
 </li>
-<li><a href="#orgd9ae054">10. Virtual machine</a>
+<li><a href="#org3debeac">10. Virtual machine</a>
 <ul>
-<li><a href="#orgb69fbe0">10.1. instruction set</a>
+<li><a href="#org85776a5">10.1. instruction set</a>
 <ul>
-<li><a href="#org52968fa">10.1.1. overview table</a></li>
-<li><a href="#org5d14c50">10.1.2. kbd@ - read scancode of pressed or released key</a></li>
-<li><a href="#org997aa8a">10.1.3. vidput - put image1 into image2, at location x, y</a></li>
-<li><a href="#org7d2145d">10.1.4. cmove - copy memory array</a></li>
-<li><a href="#org3dae1d1">10.1.5. tvidput - put image with transparency support</a></li>
-<li><a href="#orgd6f6733">10.1.6. charput - draw text character</a></li>
+<li><a href="#org10947e1">10.1.1. overview table</a></li>
+<li><a href="#org42eed2a">10.1.2. kbd@ - read scancode of pressed or released key</a></li>
+<li><a href="#org3c170f3">10.1.3. vidput - put image1 into image2, at location x, y</a></li>
+<li><a href="#org4c1b71f">10.1.4. cmove - copy memory array</a></li>
+<li><a href="#org050fd93">10.1.5. tvidput - put image with transparency support</a></li>
+<li><a href="#orgfcf732b">10.1.6. charput - draw text character</a></li>
 </ul>
 </li>
 </ul>
 </li>
-<li><a href="#org8550cb7">11. Fifth source format</a>
+<li><a href="#org3b7244d">11. Fifth source format</a>
 <ul>
-<li><a href="#orgd5e3f59">11.1. FSCII</a></li>
+<li><a href="#org3078f68">11.1. FSCII</a></li>
 </ul>
 </li>
-<li><a href="#orgc3ae776">12. Fifth commands</a>
+<li><a href="#org7ab9dd0">12. Fifth commands</a>
 <ul>
-<li><a href="#org5369ba9">12.1. Compilation &amp; miscellaneous</a></li>
-<li><a href="#org20c4a54">12.2. Conditionals &amp; control flow</a></li>
-<li><a href="#org94aecc7">12.3. Disk &amp; file access</a></li>
-<li><a href="#orge7846ad">12.4. Dynamic memory</a></li>
-<li><a href="#org0749970">12.5. Graphics and text</a></li>
-<li><a href="#org31ff701">12.6. Math, memory &amp; stack manipulation</a></li>
-<li><a href="#org81063af">12.7. Dynamic &amp; static strings</a></li>
+<li><a href="#orgc19ed00">12.1. Compilation &amp; miscellaneous</a></li>
+<li><a href="#org52d6182">12.2. Conditionals &amp; control flow</a></li>
+<li><a href="#org9a1c44e">12.3. Disk &amp; file access</a></li>
+<li><a href="#orgb7a0ec7">12.4. Dynamic memory</a></li>
+<li><a href="#orgc2cfe7c">12.5. Graphics and text</a></li>
+<li><a href="#org0644b6a">12.6. Math, memory &amp; stack manipulation</a></li>
+<li><a href="#org6965f88">12.7. Dynamic &amp; static strings</a></li>
 </ul>
 </li>
-<li><a href="#org02f7fb3">13. Dynamically loadable modules</a>
+<li><a href="#orge322491">13. Dynamically loadable modules</a>
 <ul>
-<li><a href="#orgbae286f">13.1. Keyboard driver</a></li>
-<li><a href="#org3255f4e">13.2. Mouse driver</a></li>
-<li><a href="#org64d1a45">13.3. 2D graphic library</a></li>
-<li><a href="#org3bd5475">13.4. Trigonometry functions</a>
+<li><a href="#orgc575c29">13.1. Keyboard driver</a></li>
+<li><a href="#org7c5c975">13.2. Mouse driver</a></li>
+<li><a href="#org7e9e6e4">13.3. 2D graphic library</a></li>
+<li><a href="#org53b108e">13.4. Trigonometry functions</a>
 <ul>
-<li><a href="#orge23e698">13.4.1. sin ( a &#x2013; result )</a></li>
-<li><a href="#orgfa790a4">13.4.2. cos ( a &#x2013; result )</a></li>
+<li><a href="#orga868964">13.4.1. sin ( a &#x2013; result )</a></li>
+<li><a href="#org7e217b7">13.4.2. cos ( a &#x2013; result )</a></li>
 </ul>
 </li>
 </ul>
@@ -335,8 +352,8 @@ pre {background-color: #111; color: #ccc;}
 </div>
 </div>
 
-<div id="outline-container-orga1937e0" class="outline-2">
-<h2 id="orga1937e0"><span class="section-number-2">1</span> General</h2>
+<div id="outline-container-org53aa659" class="outline-2">
+<h2 id="org53aa659"><span class="section-number-2">1</span> General</h2>
 <div class="outline-text-2" id="text-1">
 <ul class="org-ul">
 <li>This program is free software: released under Creative Commons Zero
@@ -352,8 +369,8 @@ pre {background-color: #111; color: #ccc;}
 <li><a href="https://www.svjatoslav.eu/projects/">Other software projects hosted at svjatoslav.eu</a></li>
 </ul>
 </div>
-<div id="outline-container-org4ccb678" class="outline-3">
-<h3 id="org4ccb678"><span class="section-number-3">1.1</span> Source code</h3>
+<div id="outline-container-org0222a82" class="outline-3">
+<h3 id="org0222a82"><span class="section-number-3">1.1</span> Source code</h3>
 <div class="outline-text-3" id="text-1-1">
 <ul class="org-ul">
 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=fifth.git;a=snapshot;h=HEAD;sf=tgz">Download latest snapshot in TAR GZ format</a></li>
@@ -371,8 +388,8 @@ git clone https://www2.svjatoslav.eu/git/fifth.git
 </div>
 </div>
 
-<div id="outline-container-org02e49e6" class="outline-2">
-<h2 id="org02e49e6"><span class="section-number-2">2</span> !Project deprecated!</h2>
+<div id="outline-container-org1ba4dab" class="outline-2">
+<h2 id="org1ba4dab"><span class="section-number-2">2</span> !Project deprecated!</h2>
 <div class="outline-text-2" id="text-2">
 <p>
 Current implementation does not support object oriented
@@ -391,11 +408,11 @@ operating system.
 </p>
 </div>
 </div>
-<div id="outline-container-orgdc8dd24" class="outline-2">
-<h2 id="orgdc8dd24"><span class="section-number-2">3</span> Introduction</h2>
+<div id="outline-container-org27a9291" class="outline-2">
+<h2 id="org27a9291"><span class="section-number-2">3</span> Introduction</h2>
 <div class="outline-text-2" id="text-3">
 <p>
-Fifth is programming lanquage &amp; operating system, running on <a href="#orgd9ae054">virtual
+Fifth is programming lanquage &amp; operating system, running on <a href="#org3debeac">virtual
 machine</a>, with custom instruction set. It is much like Charles Chunk
 Moore's Forth, it also uses stack architecture, and many commands are
 similar. Basically I got familiar with concepts of Forth, and being
@@ -406,11 +423,11 @@ inspired created my own system.
 <li><a href="5TH_ET.txt">Example Fifth source file - text editor</a></li>
 </ul>
 </div>
-<div id="outline-container-org040189a" class="outline-3">
-<h3 id="org040189a"><span class="section-number-3">3.1</span> screenshots</h3>
+<div id="outline-container-org7b05666" class="outline-3">
+<h3 id="org7b05666"><span class="section-number-3">3.1</span> screenshots</h3>
 <div class="outline-text-3" id="text-3-1">
 
-<div id="orga3588d5" class="figure">
+<div class="figure">
 <p><img src="screenshots/start.png" alt="start.png" />
 </p>
 </div>
@@ -420,7 +437,7 @@ Startup screen diplaying Fifth logo and full file list.
 </p>
 
 
-<div id="orgdb75c0b" class="figure">
+<div class="figure">
 <p><img src="screenshots/dictionary.png" alt="dictionary.png" />
 </p>
 </div>
@@ -433,7 +450,7 @@ they can be selectively compiled or interpreted.
 
 
 
-<div id="org5be1eaf" class="figure">
+<div class="figure">
 <p><img src="screenshots/text editor.png" alt="text editor.png" />
 </p>
 </div>
@@ -445,8 +462,8 @@ Built in text editor.
 </div>
 </div>
 
-<div id="outline-container-org3c7b2e9" class="outline-2">
-<h2 id="org3c7b2e9"><span class="section-number-2">4</span> Installation</h2>
+<div id="outline-container-org5c0e3c1" class="outline-2">
+<h2 id="org5c0e3c1"><span class="section-number-2">4</span> Installation</h2>
 <div class="outline-text-2" id="text-4">
 <p>
 Just unpack all files, witout altering original directory structure,
@@ -456,13 +473,13 @@ or EMULATOR.COM ), and virtual disk file ( DISK.RAW ).
 </p>
 
 <p>
-Read more about <a href="#org1b662d2">Fifth distribution directory tree description</a>.
+Read more about <a href="#org064502d">Fifth distribution directory tree description</a>.
 </p>
 </div>
 </div>
 
-<div id="outline-container-org1b662d2" class="outline-2">
-<h2 id="org1b662d2"><span class="section-number-2">5</span> Fifth distribution directory tree description</h2>
+<div id="outline-container-org064502d" class="outline-2">
+<h2 id="org064502d"><span class="section-number-2">5</span> Fifth distribution directory tree description</h2>
 <div class="outline-text-2" id="text-5">
 <p>
 After downloading and unpacking the ZIP file you shoud get directory
@@ -487,12 +504,12 @@ tree similar to this:
 </div>
 </div>
 
-<div id="outline-container-org1ffd5e0" class="outline-2">
-<h2 id="org1ffd5e0"><span class="section-number-2">6</span> Requirements</h2>
+<div id="outline-container-orge5e54fa" class="outline-2">
+<h2 id="orge5e54fa"><span class="section-number-2">6</span> Requirements</h2>
 <div class="outline-text-2" id="text-6">
 </div>
-<div id="outline-container-org83bdd27" class="outline-3">
-<h3 id="org83bdd27"><span class="section-number-3">6.1</span> Software</h3>
+<div id="outline-container-org6f95f4b" class="outline-3">
+<h3 id="org6f95f4b"><span class="section-number-3">6.1</span> Software</h3>
 <div class="outline-text-3" id="text-6-1">
 <ul class="org-ul">
 <li>MS-DOS 6.22, with HIMEM.SYS loaded.</li>
@@ -504,8 +521,8 @@ tree similar to this:
 </ul>
 </div>
 </div>
-<div id="outline-container-orgad4b565" class="outline-3">
-<h3 id="orgad4b565"><span class="section-number-3">6.2</span> Hardware</h3>
+<div id="outline-container-org51eb820" class="outline-3">
+<h3 id="org51eb820"><span class="section-number-3">6.2</span> Hardware</h3>
 <div class="outline-text-3" id="text-6-2">
 <ul class="org-ul">
 <li>Minimum CPU 386.</li>
@@ -515,8 +532,8 @@ tree similar to this:
 </ul>
 </div>
 </div>
-<div id="outline-container-org32cb851" class="outline-3">
-<h3 id="org32cb851"><span class="section-number-3">6.3</span> Human</h3>
+<div id="outline-container-org5d390fa" class="outline-3">
+<h3 id="org5d390fa"><span class="section-number-3">6.3</span> Human</h3>
 <div class="outline-text-3" id="text-6-3">
 <ul class="org-ul">
 <li>Beginner level Forth knowledge is recommended.</li>
@@ -525,29 +542,43 @@ tree similar to this:
 </div>
 </div>
 </div>
-<div id="outline-container-org9413aba" class="outline-2">
-<h2 id="org9413aba"><span class="section-number-2">7</span> Numbers representation within Fifth</h2>
+<div id="outline-container-org05c7be5" class="outline-2">
+<h2 id="org05c7be5"><span class="section-number-2">7</span> Numbers representation within Fifth</h2>
 <div class="outline-text-2" id="text-7">
+<p>
+Because we are in full experimentation mode here (no regard for
+compatibility whatsoever), why not to try also alternative number
+representation ?
+</p>
+
+<p>
+Here alternative hexadecimal number representation format is devised:
+</p>
+
 
-<div id="org2023443" class="figure">
+<div class="figure">
 <p><a href="numbers.png"><img src="numbers.png" alt="numbers.png" /></a>
 </p>
 </div>
 
 <p>
-Because I can define everything, starting from CPU, why not try also
-alternative and unique number representation ?
+Essentially square is split into 4 triangles. Each triangle represents
+one bit.
+</p>
+
+<p>
+Fifth uses this hexadecimal format as primary throughout entire
+system.
 </p>
 
 <p>
-Fifth uses its hexdecimal number representation as primary. Numbers
-shape is formed by dividing a square into four parts. And manipulating
-their color (black or white).
+See also: <a href="https://en.wikipedia.org/wiki/Bibi-binary">Bibi-binary</a>.
 </p>
 </div>
 </div>
-<div id="outline-container-orgebb1600" class="outline-2">
-<h2 id="orgebb1600"><span class="section-number-2">8</span> Disk file map, and it's data structures</h2>
+
+<div id="outline-container-org06c8993" class="outline-2">
+<h2 id="org06c8993"><span class="section-number-2">8</span> Disk file map, and it's data structures</h2>
 <div class="outline-text-2" id="text-8">
 <p>
 Core and high-level boot code is stored outside of the filesystem to
@@ -555,8 +586,8 @@ allow easy access to it, at early booting time, when filesystem is not
 yet initialized.
 </p>
 </div>
-<div id="outline-container-org8ff9302" class="outline-3">
-<h3 id="org8ff9302"><span class="section-number-3">8.1</span> Disk allocation</h3>
+<div id="outline-container-org84aa87e" class="outline-3">
+<h3 id="org84aa87e"><span class="section-number-3">8.1</span> Disk allocation</h3>
 <div class="outline-text-3" id="text-8-1">
 <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
 
@@ -603,8 +634,8 @@ yet initialized.
 </table>
 </div>
 </div>
-<div id="outline-container-org022023f" class="outline-3">
-<h3 id="org022023f"><span class="section-number-3">8.2</span> FAT entry format:</h3>
+<div id="outline-container-org524c276" class="outline-3">
+<h3 id="org524c276"><span class="section-number-3">8.2</span> FAT entry format:</h3>
 <div class="outline-text-3" id="text-8-2">
 <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
 
@@ -639,8 +670,8 @@ yet initialized.
 </table>
 </div>
 </div>
-<div id="outline-container-orgfcf638a" class="outline-3">
-<h3 id="orgfcf638a"><span class="section-number-3">8.3</span> File entry format</h3>
+<div id="outline-container-org21c233b" class="outline-3">
+<h3 id="org21c233b"><span class="section-number-3">8.3</span> File entry format</h3>
 <div class="outline-text-3" id="text-8-3">
 <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
 
@@ -694,8 +725,8 @@ yet initialized.
 </div>
 </div>
 </div>
-<div id="outline-container-orgbd93844" class="outline-2">
-<h2 id="orgbd93844"><span class="section-number-2">9</span> Core architecture</h2>
+<div id="outline-container-orga899cc5" class="outline-2">
+<h2 id="orga899cc5"><span class="section-number-2">9</span> Core architecture</h2>
 <div class="outline-text-2" id="text-9">
 <p>
 Fifth core is simply some amount of already compiled into machine code
@@ -708,8 +739,8 @@ 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-org625be09" class="outline-3">
-<h3 id="org625be09"><span class="section-number-3">9.1</span> Dictionary entry format</h3>
+<div id="outline-container-org4df227c" class="outline-3">
+<h3 id="org4df227c"><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">
 
@@ -777,8 +808,8 @@ run through headers backwards and find needed entry.
 </p>
 </div>
 </div>
-<div id="outline-container-orged89e76" class="outline-3">
-<h3 id="orged89e76"><span class="section-number-3">9.2</span> Possible module types</h3>
+<div id="outline-container-org3ba785a" class="outline-3">
+<h3 id="org3ba785a"><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">
 
@@ -833,8 +864,8 @@ run through headers backwards and find needed entry.
 </table>
 </div>
 </div>
-<div id="outline-container-orgd8943d6" class="outline-3">
-<h3 id="orgd8943d6"><span class="section-number-3">9.3</span> Memory map</h3>
+<div id="outline-container-org787b6e1" class="outline-3">
+<h3 id="org787b6e1"><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">
 
@@ -882,8 +913,8 @@ run through headers backwards and find needed entry.
 </div>
 </div>
 </div>
-<div id="outline-container-orgd9ae054" class="outline-2">
-<h2 id="orgd9ae054"><span class="section-number-2">10</span> Virtual machine</h2>
+<div id="outline-container-org3debeac" class="outline-2">
+<h2 id="org3debeac"><span class="section-number-2">10</span> Virtual machine</h2>
 <div class="outline-text-2" id="text-10">
 <p>
 Using CPU emulator slows it down but I shouldn't now think too mutch
@@ -937,12 +968,12 @@ CPU has following registers:
 </tbody>
 </table>
 </div>
-<div id="outline-container-orgb69fbe0" class="outline-3">
-<h3 id="orgb69fbe0"><span class="section-number-3">10.1</span> instruction set</h3>
+<div id="outline-container-org85776a5" class="outline-3">
+<h3 id="org85776a5"><span class="section-number-3">10.1</span> instruction set</h3>
 <div class="outline-text-3" id="text-10-1">
 </div>
-<div id="outline-container-org52968fa" class="outline-4">
-<h4 id="org52968fa"><span class="section-number-4">10.1.1</span> overview table</h4>
+<div id="outline-container-org10947e1" class="outline-4">
+<h4 id="org10947e1"><span class="section-number-4">10.1.1</span> overview table</h4>
 <div class="outline-text-4" id="text-10-1-1">
 <p>
 Virtual CPU, commands (most of them are avaiable as ordinary commands
@@ -987,7 +1018,7 @@ in programming language):
 
 <tr>
 <td class="org-right">2</td>
-<td class="org-left"><a href="#org5d14c50">kbd@</a></td>
+<td class="org-left"><a href="#org42eed2a">kbd@</a></td>
 <td class="org-left">&#x2013; c</td>
 <td class="org-left">read scancode of pressed or released key</td>
 </tr>
@@ -1267,14 +1298,14 @@ in programming language):
 
 <tr>
 <td class="org-right">42</td>
-<td class="org-left"><a href="#org997aa8a">vidput</a></td>
+<td class="org-left"><a href="#org3c170f3">vidput</a></td>
 <td class="org-left">addr1 addr2 x y --</td>
 <td class="org-left">put image1 into image2, at location x, y</td>
 </tr>
 
 <tr>
 <td class="org-right">43</td>
-<td class="org-left"><a href="#org7d2145d">cmove</a></td>
+<td class="org-left"><a href="#org4c1b71f">cmove</a></td>
 <td class="org-left">addr1 addr2 amount</td>
 <td class="org-left">move memory from addr1 to addr2</td>
 </tr>
@@ -1288,7 +1319,7 @@ in programming language):
 
 <tr>
 <td class="org-right">45</td>
-<td class="org-left"><a href="#org3dae1d1">tvidput</a></td>
+<td class="org-left"><a href="#org050fd93">tvidput</a></td>
 <td class="org-left">addr1 addr2 x y --</td>
 <td class="org-left">put image with transparency support</td>
 </tr>
@@ -1302,7 +1333,7 @@ in programming language):
 
 <tr>
 <td class="org-right">47</td>
-<td class="org-left"><a href="#orgd6f6733">charput</a></td>
+<td class="org-left"><a href="#orgfcf732b">charput</a></td>
 <td class="org-left">colorfg colorbg addrsrc addrdest x y</td>
 <td class="org-left">draw text character</td>
 </tr>
@@ -1311,24 +1342,24 @@ in programming language):
 </div>
 </div>
 
-<div id="outline-container-org5d14c50" class="outline-4">
-<h4 id="org5d14c50"><span class="section-number-4">10.1.2</span> kbd@ - read scancode of pressed or released key</h4>
+<div id="outline-container-org42eed2a" class="outline-4">
+<h4 id="org42eed2a"><span class="section-number-4">10.1.2</span> kbd@ - read scancode of pressed or released key</h4>
 <div class="outline-text-4" id="text-10-1-2">
 <p>
 Returns 0 if no data available.
 </p>
 </div>
 </div>
-<div id="outline-container-org997aa8a" class="outline-4">
-<h4 id="org997aa8a"><span class="section-number-4">10.1.3</span> vidput - put image1 into image2, at location x, y</h4>
+<div id="outline-container-org3c170f3" class="outline-4">
+<h4 id="org3c170f3"><span class="section-number-4">10.1.3</span> vidput - put image1 into image2, at location x, y</h4>
 <div class="outline-text-4" id="text-10-1-3">
 <p>
 Does clipping, so part of a big image can be mapped into smaller one.
 </p>
 </div>
 </div>
-<div id="outline-container-org7d2145d" class="outline-4">
-<h4 id="org7d2145d"><span class="section-number-4">10.1.4</span> cmove - copy memory array</h4>
+<div id="outline-container-org4c1b71f" class="outline-4">
+<h4 id="org4c1b71f"><span class="section-number-4">10.1.4</span> cmove - copy memory array</h4>
 <div class="outline-text-4" id="text-10-1-4">
 <p>
 Move memory from addr1 to addr2. If addr1 is greater than addr2 then
@@ -1338,8 +1369,8 @@ overlap.
 </p>
 </div>
 </div>
-<div id="outline-container-org3dae1d1" class="outline-4">
-<h4 id="org3dae1d1"><span class="section-number-4">10.1.5</span> tvidput - put image with transparency support</h4>
+<div id="outline-container-org050fd93" class="outline-4">
+<h4 id="org050fd93"><span class="section-number-4">10.1.5</span> tvidput - put image with transparency support</h4>
 <div class="outline-text-4" id="text-10-1-5">
 <p>
 Stack footprint
@@ -1358,8 +1389,8 @@ Color 255 in source image is treated as transparent.
 </p>
 </div>
 </div>
-<div id="outline-container-orgd6f6733" class="outline-4">
-<h4 id="orgd6f6733"><span class="section-number-4">10.1.6</span> charput - draw text character</h4>
+<div id="outline-container-orgfcf732b" class="outline-4">
+<h4 id="orgfcf732b"><span class="section-number-4">10.1.6</span> charput - draw text character</h4>
 <div class="outline-text-4" id="text-10-1-6">
 <p>
 Draw character to image buffer located at "addrdest" to specified x &amp;
@@ -1371,8 +1402,8 @@ character.
 </div>
 </div>
 
-<div id="outline-container-org8550cb7" class="outline-2">
-<h2 id="org8550cb7"><span class="section-number-2">11</span> Fifth source format</h2>
+<div id="outline-container-org3b7244d" class="outline-2">
+<h2 id="org3b7244d"><span class="section-number-2">11</span> Fifth source format</h2>
 <div class="outline-text-2" id="text-11">
 <p>
 Fifth uses a different character table and codes than ASCII (still
@@ -1383,8 +1414,8 @@ numeric values. So typical nemric characters "0123&#x2026;"  is treated
 like ordinary letters.
 </p>
 </div>
-<div id="outline-container-orgd5e3f59" class="outline-3">
-<h3 id="orgd5e3f59"><span class="section-number-3">11.1</span> FSCII</h3>
+<div id="outline-container-org3078f68" class="outline-3">
+<h3 id="org3078f68"><span class="section-number-3">11.1</span> FSCII</h3>
 <div class="outline-text-3" id="text-11-1">
 <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
 
@@ -1444,12 +1475,12 @@ like ordinary letters.
 </div>
 </div>
 </div>
-<div id="outline-container-orgc3ae776" class="outline-2">
-<h2 id="orgc3ae776"><span class="section-number-2">12</span> Fifth commands</h2>
+<div id="outline-container-org7ab9dd0" class="outline-2">
+<h2 id="org7ab9dd0"><span class="section-number-2">12</span> Fifth commands</h2>
 <div class="outline-text-2" id="text-12">
 </div>
-<div id="outline-container-org5369ba9" class="outline-3">
-<h3 id="org5369ba9"><span class="section-number-3">12.1</span> Compilation &amp; miscellaneous</h3>
+<div id="outline-container-orgc19ed00" class="outline-3">
+<h3 id="orgc19ed00"><span class="section-number-3">12.1</span> Compilation &amp; miscellaneous</h3>
 <div class="outline-text-3" id="text-12-1">
 <p class="verse">
 init    module  ( &#x2013; )<br />
@@ -1617,8 +1648,8 @@ ne              ( entrydata entrytype &#x2013; ) Compile new dictionary entry.<b
 </p>
 </div>
 </div>
-<div id="outline-container-org20c4a54" class="outline-3">
-<h3 id="org20c4a54"><span class="section-number-3">12.2</span> Conditionals &amp; control flow</h3>
+<div id="outline-container-org52d6182" class="outline-3">
+<h3 id="org52d6182"><span class="section-number-3">12.2</span> Conditionals &amp; control flow</h3>
 <div class="outline-text-3" id="text-12-2">
 <p class="verse">
 if              ( flag &#x2013; )   (immideate)<br />
@@ -1660,8 +1691,8 @@ done            ( &#x2013; ) exit from "until .. loop"<br />
 </p>
 </div>
 </div>
-<div id="outline-container-org94aecc7" class="outline-3">
-<h3 id="org94aecc7"><span class="section-number-3">12.3</span> Disk &amp; file access</h3>
+<div id="outline-container-org9a1c44e" class="outline-3">
+<h3 id="org9a1c44e"><span class="section-number-3">12.3</span> Disk &amp; file access</h3>
 <div class="outline-text-3" id="text-12-3">
 <p class="verse">
 diskload ( FromDisk ToMem amount &#x2013; )<br />
@@ -1720,8 +1751,8 @@ fsDloadnew ( DynStr&lt;SrcFileName&gt; &#x2013; DynHand&lt;DataDest&gt; )<br />
 </p>
 </div>
 </div>
-<div id="outline-container-orge7846ad" class="outline-3">
-<h3 id="orge7846ad"><span class="section-number-3">12.4</span> Dynamic memory</h3>
+<div id="outline-container-orgb7a0ec7" class="outline-3">
+<h3 id="orgb7a0ec7"><span class="section-number-3">12.4</span> Dynamic memory</h3>
 <div class="outline-text-3" id="text-12-4">
 <p class="verse">
 dynal ( size &#x2013; handle )<br />
@@ -1764,8 +1795,8 @@ dyn. ( handle &#x2013; )<br />
 </p>
 </div>
 </div>
-<div id="outline-container-org0749970" class="outline-3">
-<h3 id="org0749970"><span class="section-number-3">12.5</span> Graphics and text</h3>
+<div id="outline-container-orgc2cfe7c" class="outline-3">
+<h3 id="orgc2cfe7c"><span class="section-number-3">12.5</span> Graphics and text</h3>
 <div class="outline-text-3" id="text-12-5">
 <p class="verse">
 .               ( n &#x2013; ) print number on screen<br />
@@ -1836,8 +1867,8 @@ copyscreen      ( SrcImgHandle DestImgHandle &#x2013; ) copy contenc of source<b
 </p>
 </div>
 </div>
-<div id="outline-container-org31ff701" class="outline-3">
-<h3 id="org31ff701"><span class="section-number-3">12.6</span> Math, memory &amp; stack manipulation</h3>
+<div id="outline-container-org0644b6a" class="outline-3">
+<h3 id="org0644b6a"><span class="section-number-3">12.6</span> Math, memory &amp; stack manipulation</h3>
 <div class="outline-text-3" id="text-12-6">
 <p class="verse">
 off             ( n &#x2013; ) writes 0 to given address, good for zeroing variable.<br />
@@ -1900,8 +1931,8 @@ abs             ( n &#x2013; |n| )<br />
 </p>
 </div>
 </div>
-<div id="outline-container-org81063af" class="outline-3">
-<h3 id="org81063af"><span class="section-number-3">12.7</span> Dynamic &amp; static strings</h3>
+<div id="outline-container-org6965f88" class="outline-3">
+<h3 id="org6965f88"><span class="section-number-3">12.7</span> Dynamic &amp; static strings</h3>
 <div class="outline-text-3" id="text-12-7">
 <p>
 Fifth supports both static and dynamic strings. Static strings must
@@ -2036,12 +2067,12 @@ ex:     var mystring1<br />
 </div>
 </div>
 </div>
-<div id="outline-container-org02f7fb3" class="outline-2">
-<h2 id="org02f7fb3"><span class="section-number-2">13</span> Dynamically loadable modules</h2>
+<div id="outline-container-orge322491" class="outline-2">
+<h2 id="orge322491"><span class="section-number-2">13</span> Dynamically loadable modules</h2>
 <div class="outline-text-2" id="text-13">
 </div>
-<div id="outline-container-orgbae286f" class="outline-3">
-<h3 id="orgbae286f"><span class="section-number-3">13.1</span> Keyboard driver</h3>
+<div id="outline-container-orgc575c29" class="outline-3">
+<h3 id="orgc575c29"><span class="section-number-3">13.1</span> Keyboard driver</h3>
 <div class="outline-text-3" id="text-13-1">
 <p class="verse">
 <br />
@@ -2079,8 +2110,8 @@ FF      space<br />
 </p>
 </div>
 </div>
-<div id="outline-container-org3255f4e" class="outline-3">
-<h3 id="org3255f4e"><span class="section-number-3">13.2</span> Mouse driver</h3>
+<div id="outline-container-org7c5c975" class="outline-3">
+<h3 id="org7c5c975"><span class="section-number-3">13.2</span> Mouse driver</h3>
 <div class="outline-text-3" id="text-13-2">
 <p class="verse">
 mousex  var     Mouse x coordinate.<br />
@@ -2100,35 +2131,46 @@ mousedo         ( &#x2013; ) Updates mouse coordinates and keys. Parse mouse<br
 </p>
 </div>
 </div>
-<div id="outline-container-org64d1a45" class="outline-3">
-<h3 id="org64d1a45"><span class="section-number-3">13.3</span> 2D graphic library</h3>
+<div id="outline-container-org7e9e6e4" class="outline-3">
+<h3 id="org7e9e6e4"><span class="section-number-3">13.3</span> 2D graphic library</h3>
 <div class="outline-text-3" id="text-13-3">
-<p class="verse">
-lineh           ( color len x y imgbuf &#x2013; ) draws horisontal line<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;from X,Y coordinates to right, with specified length.<br />
-linev           ( color len x y imgbuf &#x2013; ) draws vertical line<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;down, from coordinates X,Y, with specified length.<br />
-box             ( color x2 x1 y2 y1 imgbuf &#x2013; ) draws rectangular<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;box. x2 bust be &gt;= x1, y2 must be &gt;= y1.<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;x1,y1------&#x2013;&#x2014;+<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;|             |<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;|             |<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;+------&#x2013;&#x2014;x2,y2<br />
-<br />
-flipv           ( imgbuf &#x2013; ) flip image vertically.<br />
-imgcoltrans     ( ImgBuf Color ToColor &#x2013; ) Translate all pixels in<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;specified image with "Color" into "ToColor".<br />
-imgfill         ( color x y imgbuf &#x2013; ) Fill image region starting at location<br />
-&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;X &amp; Y with specified color.<br />
+<dl class="org-dl">
+<dt>lineh ( color len x y imgbuf &#x2013; )</dt><dd>draws horisontal line from X,Y
+coordinates to right, with specified length.</dd>
+
+<dt>linev ( color len x y imgbuf &#x2013; )</dt><dd>draws vertical line down, from
+coordinates X,Y, with specified length.</dd>
+
+<dt>box ( color x2 x1 y2 y1 imgbuf &#x2013; )</dt><dd><p>
+draws rectangular box. x2
+bust be &gt;= x1, y2 must be &gt;= y1.
 </p>
+
+<pre class="example">
+x1,y1-----------+
+  |             |
+  |             |
+  +-----------x2,y2
+</pre></dd>
+
+<dt>flipv ( imgbuf &#x2013; )</dt><dd>flip image vertically.</dd>
+
+<dt>imgcoltrans ( ImgBuf Color ToColor &#x2013; )</dt><dd>Translate all pixels in
+specified image with "Color" into "ToColor".</dd>
+
+<dt>imgfill ( color x y imgbuf &#x2013; )</dt><dd>Fill image region starting at
+location X &amp; Y with specified color.</dd>
+</dl>
 </div>
 </div>
-<div id="outline-container-org3bd5475" class="outline-3">
-<h3 id="org3bd5475"><span class="section-number-3">13.4</span> Trigonometry functions</h3>
+
+
+<div id="outline-container-org53b108e" class="outline-3">
+<h3 id="org53b108e"><span class="section-number-3">13.4</span> Trigonometry functions</h3>
 <div class="outline-text-3" id="text-13-4">
 </div>
-<div id="outline-container-orge23e698" class="outline-4">
-<h4 id="orge23e698"><span class="section-number-4">13.4.1</span> sin ( a &#x2013; result )</h4>
+<div id="outline-container-orga868964" class="outline-4">
+<h4 id="orga868964"><span class="section-number-4">13.4.1</span> sin ( a &#x2013; result )</h4>
 <div class="outline-text-4" id="text-13-4-1">
 <p>
 Return sinus from given angle "a", 360ø is 2000. So 1000 represents
@@ -2136,11 +2178,11 @@ Return sinus from given angle "a", 360ø is 2000. So 1000 represents
 </p>
 </div>
 </div>
-<div id="outline-container-orgfa790a4" class="outline-4">
-<h4 id="orgfa790a4"><span class="section-number-4">13.4.2</span> cos ( a &#x2013; result )</h4>
+<div id="outline-container-org7e217b7" class="outline-4">
+<h4 id="org7e217b7"><span class="section-number-4">13.4.2</span> cos ( a &#x2013; result )</h4>
 <div class="outline-text-4" id="text-13-4-2">
 <p>
-Return cosinus from given angle.  Parameters are like in <a href="#orge23e698">sin</a> function.
+Return cosinus from given angle.  Parameters are like in <a href="#orga868964">sin</a> function.
 </p>
 </div>
 </div>
@@ -2149,8 +2191,8 @@ Return cosinus from given angle.  Parameters are like in <a href="#orge23e698">s
 </div>
 <div id="postamble" class="status">
 <p class="author">Author: Svjatoslav Agejenko</p>
-<p class="date">Created: 2021-12-21 T 20:02</p>
-<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+<p class="date">Created: 2022-04-17 Sun 18:14</p>
+<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
 </div>
 </body>
 </html>
index 79b5592..6303947 100644 (file)
@@ -1,14 +1,5 @@
 #+TITLE: Fifth - virtual machine, operating system, programming language
 
-* (document settings) :noexport:
-** use dark style for TWBS-HTML exporter
-#+HTML_HEAD: <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
-#+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-#+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
-#+HTML_HEAD: <style type="text/css">
-#+HTML_HEAD:   footer {background-color: #111 !important;}
-#+HTML_HEAD:   pre {background-color: #111; color: #ccc;}
-#+HTML_HEAD: </style>
 * General
 - This program is free software: released under Creative Commons Zero
   (CC0) license
@@ -110,14 +101,22 @@ tree similar to this:
 - Lots of enthusiasm.
 * Numbers representation within Fifth
 
+Because we are in full experimentation mode here (no regard for
+compatibility whatsoever), why not to try also alternative number
+representation ?
+
+Here alternative hexadecimal number representation format is devised:
+
 [[file:numbers.png][file:numbers.png]]
 
-Because I can define everything, starting from CPU, why not try also
-alternative and unique number representation ?
+Essentially square is split into 4 triangles. Each triangle represents
+one bit.
+
+Fifth uses this hexadecimal format as primary throughout entire
+system.
+
+See also: [[https://en.wikipedia.org/wiki/Bibi-binary][Bibi-binary]].
 
-Fifth uses its hexdecimal number representation as primary. Numbers
-shape is formed by dividing a square into four parts. And manipulating
-their color (black or white).
 * Disk file map, and it's data structures
 Core and high-level boot code is stored outside of the filesystem to
 allow easy access to it, at early booting time, when filesystem is not
@@ -928,24 +927,32 @@ mousedo         ( -- ) Updates mouse coordinates and keys. Parse mouse
                 click buffer, and draw mouse cursor to "screen".
 #+END_VERSE
 ** 2D graphic library
-#+BEGIN_VERSE
-lineh           ( color len x y imgbuf -- ) draws horisontal line
-                from X,Y coordinates to right, with specified length.
-linev           ( color len x y imgbuf -- ) draws vertical line
-                down, from coordinates X,Y, with specified length.
-box             ( color x2 x1 y2 y1 imgbuf -- ) draws rectangular
-                box. x2 bust be >= x1, y2 must be >= y1.
-                        x1,y1-----------+
-                          |             |
-                          |             |
-                          +-----------x2,y2
-
-flipv           ( imgbuf -- ) flip image vertically.
-imgcoltrans     ( ImgBuf Color ToColor -- ) Translate all pixels in
-                specified image with "Color" into "ToColor".
-imgfill         ( color x y imgbuf -- ) Fill image region starting at location
-                X & Y with specified color.
-#+END_VERSE
+
++ lineh ( color len x y imgbuf -- ) :: draws horisontal line from X,Y
+  coordinates to right, with specified length.
+
++ linev ( color len x y imgbuf -- ) :: draws vertical line down, from
+  coordinates X,Y, with specified length.
+
++ box ( color x2 x1 y2 y1 imgbuf -- ) :: draws rectangular box. x2
+  bust be >= x1, y2 must be >= y1.
+
+  #+begin_example
+    x1,y1-----------+
+      |             |
+      |             |
+      +-----------x2,y2
+  #+end_example
+
++ flipv ( imgbuf -- ) :: flip image vertically.
+
++ imgcoltrans ( ImgBuf Color ToColor -- ) :: Translate all pixels in
+  specified image with "Color" into "ToColor".
+
++ imgfill ( color x y imgbuf -- ) :: Fill image region starting at
+  location X & Y with specified color.
+
+
 ** Trigonometry functions
 *** sin ( a -- result )
 :PROPERTIES: