Author: Virgil Dupras <email@example.com>
Date: Thu, 6 Apr 2023 11:18:28 -0400
doc/hal: clarify [@], and [!],
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/fs/doc/hal.txt b/fs/doc/hal.txt
@@ -116,6 +116,16 @@ This also applies to compare, which means that, for example,
"$4242 LIT>W, RSP) 8b) compare," will never set the Z flag because even if RSP)
is $42, comparison is done one the whole W register.
+### Operation width and indirect operators
+The HAL has indirect fetch/store operators under the name of "[@]," and "[!],".
+This means that we fetch and store at the address where the operand points to.
+What happens when we use this with 8b) and 16b) operand modifiers? These
+modifiers will only apply to the last part of the fetch/store operation. Because
+all addresses in Dusk are 32-bit, it would make no sense to apply them to the
+first part of the operation.
### Branching and flags
The HAL can generate branching, conditional or not, through its "branch"