diff options
Diffstat (limited to 'labels.e')
| -rw-r--r-- | labels.e | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/labels.e b/labels.e index f528219..6ac26b2 100644 --- a/labels.e +++ b/labels.e @@ -137,7 +137,7 @@ label-value @ ; ~ This overwrites the value of a label, also doing all necessary status -~ checks and jupdates to keep track of the cirumstances under which it was +~ checks and updates to keep track of the cirumstances under which it was ~ set. The label loop relies on all write accesses going through this word. ~ ~ (new label value, label entry pointer --) @@ -169,6 +169,17 @@ ~ (updated status, entry, new value, entry) label-value ! label-status ! ; +~ Since labels have dictionary entry headers but aren't in the main +~ dictionary, we get to use the entry flag bits for other things. The only one +~ we have right now is a feature that acts as a hint to anything trying to +~ display metadata about labels, to the effect that this one represents +~ something other than an offset in the file. +~ +~ (label entry pointer --) +: set-label-non-offset dup entry-flags@ 0x01 | swap entry-flags! ; +~ (label entry pointer -- boolean) +: is-label-non-offset entry-flags@ 0x01 & ; + ~ This is a convenience helper which downstream code can use to check how ~ many bytes it has output thus-far. ~ (output memory start, current output point |