Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


Reply to @ireneista@adhd.irenes.space
Irenes (many)@ireneista@adhd.irenes.space (2026-09-08 11:03:53)
anyway, so we need to have a running concept of where in the output buffer the current output point is, which is a concept the compiler keeps track of through means opaque to us.

---Reply--- Irenes (many)@ireneista@adhd.irenes.space (2026-09-08 11:04:57) fortunately, it's not that hard to reconstruct. the compiler does go back and retrace its steps sometimes, re-writing areas of the output it's already done, but that happens in pretty controlled ways that we can deal with specially. for the most part, each major pass it does is filling the buffer up linearly, from beginning to end.
Reply

---Replies---
Irenes (many)@ireneista@adhd.irenes.space (2026-09-08 11:05:43)
in particular all the actual output happens through a few low-level words such as pack8, which are given an address to write to as parameters.

the work we did earlier today created a trap that's called each time one of those words is, and we can have the trap save the next address after each piece of output. then it'll be available for the ~ replacement to reference.