The system takes a leftover window down

Lunar Porter put a fuel gauge up and never took it away, so the shell came
back with FUEL across the top and the cursor underneath. Clearing did not
help: a window is a layer at a SCREEN position that does not scroll, which
is exactly what makes one left behind unpleasant - it sits over whatever
comes next and cannot be scrolled off, cleared away or typed past.

Taken away rather than given back, like the sprite table and for the same
reason: nothing the shell draws is a window, so there is nothing to
restore. And a program that FAULTED while one was up could not have taken
it down itself, which is why this belongs to the system rather than to
whichever programs remember.

The check for it needed writing twice, and the first version was the
familiar kind of wrong. It counted the gauge BAR's colour - and the bar
disappears on its own whatever happens, because it is drawn with a tile
the screen save puts back, so the check passed with the teardown deleted.
What actually survives is the LABEL, in font tiles the shell needs anyway.

So the screen is cleared afterwards and read cell by cell. With the window
down a cleared row is "> " and a cursor; with it up the same row is F, U,
E, L. Cells one and three being empty is the whole difference, and it is
29 and 22 pixels of it rather than a threshold somebody has to believe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-09-03 00:50:42 -04:00
co-authored by Claude Opus 5
parent 2274be4b68
commit 6073086584
3 changed files with 60 additions and 0 deletions
+6
View File
@@ -1217,6 +1217,12 @@ and nobody is looking at it afterwards.
the table is cleared, so there are none - a program that wants one writes it, and a program
that leaves one behind has left something nobody is asking about.
**A window left up is taken down at exit**, for the same reasons as the sprites and by the
same rule. A window is a layer at a screen position that does not scroll, which is exactly
what makes one left behind unpleasant: it sits over the top rows of whatever comes next and
cannot be scrolled off, cleared away or typed past. Lunar Porter left its fuel gauge up once
and the shell came back with FUEL across the top and the cursor underneath it.
**The sprite table is cleared at exit, not saved and restored.** It lives in the atlas at
0xC000, and the pages the screen save walks run to the end of the map and pick up again at the
palette, with the sprites in the gap between. That is deliberate: nothing the shell draws is a