go-vise

Constrained Size Output Virtual Machine
Info | Log | Files | Refs | README | LICENSE

signals.html (5647B)


      1 <!DOCTYPE html>
      2 <html>
      3 <!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
      4 <head>
      5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6 <!-- Released 2023 under AGPL3 -->
      7 <title>signals (vise)</title>
      8 
      9 <meta name="description" content="signals (vise)">
     10 <meta name="keywords" content="signals (vise)">
     11 <meta name="resource-type" content="document">
     12 <meta name="distribution" content="global">
     13 <meta name="Generator" content="makeinfo">
     14 <meta name="viewport" content="width=device-width,initial-scale=1">
     15 
     16 <link href="index.html" rel="start" title="Top">
     17 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
     18 <link href="index.html" rel="up" title="Top">
     19 <link href="instructions.html" rel="next" title="instructions">
     20 <link href="nomenclature.html" rel="prev" title="nomenclature">
     21 <style type="text/css">
     22 <!--
     23 a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
     24 span:hover a.copiable-link {visibility: visible}
     25 -->
     26 </style>
     27 
     28 
     29 </head>
     30 
     31 <body lang="en">
     32 <div class="chapter-level-extent" id="signals">
     33 <div class="nav-panel">
     34 <p>
     35 Next: <a href="instructions.html" accesskey="n" rel="next">Instructions</a>, Previous: <a href="nomenclature.html" accesskey="p" rel="prev">Nomenclature</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
     36 </div>
     37 <hr>
     38 <h2 class="chapter" id="Signal-flags"><span>4 Signal flags<a class="copiable-link" href="#Signal-flags"> &para;</a></span></h2>
     39 
     40 
     41 <ul class="mini-toc">
     42 <li><a href="#Client_002ddefined-signal-flags" accesskey="1">Client-defined signal flags</a></li>
     43 <li><a href="#Built_002din-signal-flags" accesskey="2">Built-in signal flags</a></li>
     44 </ul>
     45 <div class="section-level-extent" id="Client_002ddefined-signal-flags">
     46 <h3 class="section"><span>4.1 Client-defined signal flags<a class="copiable-link" href="#Client_002ddefined-signal-flags"> &para;</a></span></h3>
     47 
     48 <p>The client can define any number of signal flags to use. The number of signals <strong class="strong">MUST</strong> be declared explicitly in the client code, and <strong class="strong">MUST NOT</strong> change in stateful or asynchronous execution environments.
     49 </p>
     50 <p>In the assembly code, signals may only be referred to by their numerical value. The numeric value of client-defined signals must have numeric value <code class="code">8</code> or greater.
     51 </p>
     52 
     53 <ul class="mini-toc">
     54 <li><a href="#Flow-control" accesskey="1">Flow control</a></li>
     55 </ul>
     56 <div class="subsection-level-extent" id="Flow-control">
     57 <h4 class="subsection"><span>4.1.1 Flow control<a class="copiable-link" href="#Flow-control"> &para;</a></span></h4>
     58 
     59 <p>Signal flags enables the client to control the execution flow as a side-effect of the execution of external code symbols.
     60 </p>
     61 <p>Branching is defined using either the <code class="code">CATCH</code> or <code class="code">CROAK</code> instructions.
     62 </p>
     63 <p>The client specifies whether or not a set flag should be reset on next yield. If not, it is the responsiblity of the client to reset the flag when necessary.
     64 </p>
     65 
     66 <a class="anchor" id="builtin_005fflags"></a></div>
     67 </div>
     68 <div class="section-level-extent" id="Built_002din-signal-flags">
     69 <h3 class="section"><span>4.2 Built-in signal flags<a class="copiable-link" href="#Built_002din-signal-flags"> &para;</a></span></h3>
     70 
     71 <p>For the numeric values of the signals, please refer to the signals appendix.
     72 </p>
     73 <table class="multitable">
     74 <thead><tr><th width="15%">Flag name</th><th width="20%">Description</th><th width="55%">Lifetime</th><th width="10%">Writeable?</th></tr></thead>
     75 <tbody><tr><td width="15%"><code class="code">READIN</code></td><td width="20%">Input is being processed.</td><td width="55%">From first <code class="code">INCMP</code> until: an <code class="code">INCMP</code> match <em class="emph">or</em> an invalid input exception is triggered.</td><td width="10%">no</td></tr>
     76 <tr><td width="15%"><code class="code">INMATCH</code></td><td width="20%">Input matched an <code class="code">INCMP</code> instruction.</td><td width="55%">Next instruction.</td><td width="10%">no</td></tr>
     77 <tr><td width="15%"><code class="code">DIRTY</code></td><td width="20%">Rendered output is available.</td><td width="55%">Until output is processed.</td><td width="10%">no</td></tr>
     78 <tr><td width="15%"><code class="code">WAIT</code></td><td width="20%">Halt execution before the following instruction, and yield control to client.</td><td width="55%">Until control is yielded.</td><td width="10%">no</td></tr>
     79 <tr><td width="15%"><code class="code">LOADFAIL</code></td><td width="20%">An unexpected error has occurred during execution of an external code symbol.</td><td width="55%">Next instruction.</td><td width="10%">no</td></tr>
     80 <tr><td width="15%"><code class="code">TERMINATE</code></td><td width="20%">Terminate execution before the following instruction.</td><td width="55%">Until explicit reseet.</td><td width="10%">yes</td></tr>
     81 <tr><td width="15%"><code class="code">LANG</code></td><td width="20%">Output from an external code symbol is a valid language code, and language should be changed accordingly.</td><td width="55%">Next instruction.</td><td width="10%">yes</td></tr>
     82 </tbody>
     83 </table>
     84 </div>
     85 </div>
     86 <hr>
     87 <div class="nav-panel">
     88 <p>
     89 Next: <a href="instructions.html">Instructions</a>, Previous: <a href="nomenclature.html">Nomenclature</a>, Up: <a href="index.html">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
     90 </div>
     91 
     92 
     93 
     94 </body>
     95 </html>