diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/language.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/language.md b/docs/language.md index 2429838..43b6246 100644 --- a/docs/language.md +++ b/docs/language.md @@ -50,10 +50,12 @@ Unknown keys, a `bits` value other than 32/64, and unknown extensions are errors ## Constants and data -`const` names an integer (becomes a NASM `%define`). `data` puts a string in `.data`; the name is its address and `.len` is its length in bytes. +`const` names a constant integer expression — integer literals, character literals, other constants, and `+` `-` `*` `/`. Integers are decimal, `0x` hex, or `0b` binary (these forms work anywhere an integer does). `data` puts a string in `.data`; the name is its address and `.len` is its length in bytes. ```hdass const STDOUT = 1 +const MASK = 0xFF +const AREA = 8 * 6 // 48 data message = "type shi.\n" // message -> address, message.len -> 10 ``` |
