Skip to content

Commit

Permalink
deploy: ecef2db
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Aug 4, 2023
1 parent 53274ac commit 3b6f964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,8 @@ <h4 id="re-exporting-procedures"><a class="header" href="#re-exporting-procedure
<p>In addition to the locally-defined procedure <code>foo</code>, the above module also exports procedures <code>add</code> and <code>mul64</code> implementations of which will be identical to <code>add</code> and <code>mul</code> procedures from the <code>std::math::u64</code> module respectively.</p>
<h3 id="constants"><a class="header" href="#constants">Constants</a></h3>
<p>Miden assembly supports constant declarations. These constants are scoped to the module they are defined in and can be used as immediate parameters for Miden assembly instructions. Constants are supported as immediate values for the following instructions: <code>push</code>, <code>locaddr</code>, <code>loc_load</code>, <code>loc_loadw</code>, <code>loc_store</code>, <code>loc_storew</code>, <code>mem_load</code>, <code>mem_loadw</code>, <code>mem_store</code>, <code>mem_storew</code>.</p>
<p>Constants must be declared right after module imports and before any procedures or program bodies. A constant's name must start with an upper-case letter and can contain any combination of numbers, upper-case ASCII letters, and underscores (<code>_</code>). The number of characters in a constant name cannot exceed 100.
A constant's value must be in the range between <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span> and <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">64</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">32</span></span></span></span></span></span></span></span></span></span></span></span> (both inclusive) and can be defined by an arithmetic expression using <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>//</code>, <code>(</code>, <code>)</code> operators and references to the previously defined constants. Here <code>/</code> is a field division and <code>//</code> is an integer division. Note that the arithmetic expression cannot contain spaces.</p>
<p>Constants must be declared right after module imports and before any procedures or program bodies. A constant's name must start with an upper-case letter and can contain any combination of numbers, upper-case ASCII letters, and underscores (<code>_</code>). The number of characters in a constant name cannot exceed 100. </p>
<p>A constant's value must be in the range between <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span> and <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">64</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">32</span></span></span></span></span></span></span></span></span></span></span></span> (both inclusive) and can be defined by an arithmetic expression using <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>//</code>, <code>(</code>, <code>)</code> operators and references to the previously defined constants. Here <code>/</code> is a field division and <code>//</code> is an integer division. Note that the arithmetic expression cannot contain spaces.</p>
<pre><code>use.std::math::u64

const.CONSTANT_1=100
Expand Down
4 changes: 2 additions & 2 deletions user_docs/assembly/code_organization.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ <h4 id="re-exporting-procedures"><a class="header" href="#re-exporting-procedure
<p>In addition to the locally-defined procedure <code>foo</code>, the above module also exports procedures <code>add</code> and <code>mul64</code> implementations of which will be identical to <code>add</code> and <code>mul</code> procedures from the <code>std::math::u64</code> module respectively.</p>
<h3 id="constants"><a class="header" href="#constants">Constants</a></h3>
<p>Miden assembly supports constant declarations. These constants are scoped to the module they are defined in and can be used as immediate parameters for Miden assembly instructions. Constants are supported as immediate values for the following instructions: <code>push</code>, <code>locaddr</code>, <code>loc_load</code>, <code>loc_loadw</code>, <code>loc_store</code>, <code>loc_storew</code>, <code>mem_load</code>, <code>mem_loadw</code>, <code>mem_store</code>, <code>mem_storew</code>.</p>
<p>Constants must be declared right after module imports and before any procedures or program bodies. A constant's name must start with an upper-case letter and can contain any combination of numbers, upper-case ASCII letters, and underscores (<code>_</code>). The number of characters in a constant name cannot exceed 100.
A constant's value must be in the range between <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span> and <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">64</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">32</span></span></span></span></span></span></span></span></span></span></span></span> (both inclusive) and can be defined by an arithmetic expression using <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>//</code>, <code>(</code>, <code>)</code> operators and references to the previously defined constants. Here <code>/</code> is a field division and <code>//</code> is an integer division. Note that the arithmetic expression cannot contain spaces.</p>
<p>Constants must be declared right after module imports and before any procedures or program bodies. A constant's name must start with an upper-case letter and can contain any combination of numbers, upper-case ASCII letters, and underscores (<code>_</code>). The number of characters in a constant name cannot exceed 100. </p>
<p>A constant's value must be in the range between <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">0</span></span></span></span> and <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">64</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">32</span></span></span></span></span></span></span></span></span></span></span></span> (both inclusive) and can be defined by an arithmetic expression using <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>//</code>, <code>(</code>, <code>)</code> operators and references to the previously defined constants. Here <code>/</code> is a field division and <code>//</code> is an integer division. Note that the arithmetic expression cannot contain spaces.</p>
<pre><code>use.std::math::u64

const.CONSTANT_1=100
Expand Down

0 comments on commit 3b6f964

Please sign in to comment.