From ae9316beda1cb3805e5048ba654b4590f50931f7 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 21 Sep 2026 00:13:02 -0700 Subject: print comments in the hex dump at the offsets labels point to Force-Push: yes Change-Id: I1a0ea06380095da3e7702cab278c08bd21b292ca --- labels.e | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'labels.e') 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 -- cgit 1.4.1