More fills the screen it is on, not the screen it was written for
Twenty two lines was right when there was one screen size. It still is on the forty column screen and wastes three fifths of the eighty column one, so More asks the rows register instead - which is readable for exactly this sort of reason. Rows minus three is twenty two on a twenty five row screen, so nothing changed underneath anyone already reading files this way. It fills a bigger screen and leaves a smaller one alone. A bitmap screen has no rows and says so with a nought, which through an eight bit subtraction would be 253 lines. Anything under five falls back. The existing test stopped testing paging the moment this worked: 32 lines fits in a 47 line page, so the file never paged and the recording lost the prompt entirely. The fixture is 60 lines now - the INPUT needed moving, not just the output, which is the failure this project keeps meeting. And cosmosMoreNarrow, which runs Mode first and pages the same file on the forty column screen. Two recordings of one file at 47 lines and at 22: a More that went back to a constant would make them the same length. Both were verified with break.sh, and the first attempt was a bad break rather than a bad test - it replaced one of two reads of the rows port and the other still fetched the real value. Which is a fair argument against reading a port twice, so it is read once and kept now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
co-authored by
Claude Opus 5
parent
fba1b553d2
commit
5222c85100
+10
-1
@@ -344,8 +344,12 @@ awk 'BEGIN { for (i = 0; i < 50; i++) printf "small %05d\n", i }' > small.txt
|
||||
# for the application to mistake for an end marker. The second proves that zero blocks is
|
||||
# a valid empty file rather than an error.
|
||||
"$TOOL" format "$DISKS/type.img" 64 2 >/dev/null
|
||||
# SIXTY LINES, and the number matters. More shows a screenful less the prompt, which is 22
|
||||
# rows on the forty column screen and 47 on the eighty column one - so a file of 32 lines
|
||||
# stopped being a test of paging the day More learned to ask how tall the screen was. It fits
|
||||
# in one page now. Sixty does not fit in either.
|
||||
printf 'first line\nsecond line\n' > readable.txt
|
||||
awk 'BEGIN { for (i = 0; i < 30; i++) printf "line %02d: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n", i }' >> readable.txt
|
||||
awk 'BEGIN { for (i = 0; i < 60; i++) printf "line %02d: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n", i }' >> readable.txt
|
||||
: > empty.txt
|
||||
"$TOOL" put "$DISKS/type.img" readable.txt >/dev/null
|
||||
"$TOOL" put "$DISKS/type.img" empty.txt >/dev/null
|
||||
@@ -355,6 +359,11 @@ awk 'BEGIN { for (i = 0; i < 30; i++) printf "line %02d: ABCDEFGHIJKLMNOPQRSTUVW
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/CosmOS/Apps/More.asm" -o "$WORK/More.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/type.img" "$WORK/More.sbx" >/dev/null
|
||||
# And Mode, so that the same file can be paged on both screens without a second disk. It is
|
||||
# the only way to reach the forty column screen from inside a test.
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/CosmOS/Apps/Mode.asm" -o "$WORK/Mode.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/type.img" "$WORK/Mode.sbx" >/dev/null
|
||||
|
||||
# A disk for Copy and Compare. The files mark all three shapes a streamed tool has to
|
||||
# distinguish: no blocks, an exact whole block, and a part block. The large pair says the
|
||||
|
||||
Reference in New Issue
Block a user