diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-09-21 00:13:02 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-09-21 00:13:02 -0700 |
| commit | ae9316beda1cb3805e5048ba654b4590f50931f7 (patch) | |
| tree | 8d9b64a980eeecf4b54890dcec20e849b9107992 /labels.e | |
| parent | afb038cbe86adfc5c5fe67d3265d73b5ac3172d4 (diff) | |
print comments in the hex dump at the offsets labels point to
Force-Push: yes Change-Id: I1a0ea06380095da3e7702cab278c08bd21b292ca
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 |