Skip to content

Commit

Permalink
Merge pull request #1033 from 0xPolygonMiden/andrew-docs-hotfix
Browse files Browse the repository at this point in the history
Constant value docs hotfix
  • Loading branch information
bobbinth authored Aug 4, 2023
2 parents d6fae84 + 1bd70f4 commit ecef2db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/user_docs/assembly/code_organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ In addition to the locally-defined procedure `foo`, the above module also export
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: `push`, `locaddr`, `loc_load`, `loc_loadw`, `loc_store`, `loc_storew`, `mem_load`, `mem_loadw`, `mem_store`, `mem_storew`.

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 (`_`). The number of characters in a constant name cannot exceed 100.

A constant's value must be in the range between $0$ and $2^{64} - 2^{32}$ (both inclusive) and can be defined by an arithmetic expression using `+`, `-`, `*`, `/`, `//`, `(`, `)` operators and references to the previously defined constants. Here `/` is a field division and `//` is an integer division. Note that the arithmetic expression cannot contain spaces.

```
Expand Down

0 comments on commit ecef2db

Please sign in to comment.