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:
Anachronaut
2026-09-02 16:18:37 -04:00
co-authored by Claude Opus 5
parent fba1b553d2
commit 5222c85100
9 changed files with 232 additions and 33 deletions
+31 -3
View File
@@ -1,7 +1,8 @@
; Read a text file one screen at a time. ; Read a text file one screen at a time.
; ;
; Twenty two lines are shown before a prompt. Space advances another screen, Return one ; A screenful of lines is shown before a prompt - as many as the screen has, asked for rather
; line, and q gives the machine back to CosmOS. This is forward-only on purpose: the file ; than assumed, so that the eighty column mode is not read three fifths empty. Space advances
; another screen, Return one line, and q gives the machine back to CosmOS. This is forward-only on purpose: the file
; stream holds one block and never asks the whole document to fit in memory. ; stream holds one block and never asks the whole document to fit in memory.
; ;
; Written by ChatGPT for Anachronaut's SplitBit ; Written by ChatGPT for Anachronaut's SplitBit
@@ -100,11 +101,38 @@ pauseQuit:
INIB 0x01 INIB 0x01
OR OR
RET RET
; ---- As many lines as the screen has, less the prompt ----
;
; Twenty two was written when there was one screen size. It is still right on the forty
; column screen and wastes half of the eighty column one, so this ASKS: the rows register
; says how tall the screen is, and it 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 who was already reading files this way - it fills a bigger screen and leaves a
; smaller one alone.
;
; A BITMAP SCREEN HAS NO ROWS AT ALL and says so with a nought, which would come out as 253
; lines through an eight bit subtraction. Anything under five falls back, because a page of
; two lines is not a page and a program should not be the thing that discovers this.
fullPage: fullPage:
INA 0x33
SETD.3 LinesLeft SETD.3 LinesLeft
INIA 0d22 STA.3 ; Kept, because the sums below want A for themselves.
INIB 0d5
CCF
SUB
BRC fullPageFallback ; Borrowed, so there are fewer than five rows.
LDA.3
INIB 0d3
CCF
SUB
MVQA
STA.3 STA.3
RET RET
fullPageFallback:
INIA 0d22
STA.3 ; DP3 is still LinesLeft, from above.
RET
noName: noName:
SETD.0 Usage SETD.0 Usage
+1 -1
View File
@@ -735,7 +735,7 @@ from every assembly file in it. Several are old programs written for the bare ma
| Copy | Copies one path to another a block at a time, including an empty file or one larger than Data Memory. | | Copy | Copies one path to another a block at a time, including an empty file or one larger than Data Memory. |
| Compare | Compares two files a block at a time, stopping at their real tails rather than comparing unused bytes in the final disk blocks. | | Compare | Compares two files a block at a time, stopping at their real tails rather than comparing unused bytes in the final disk blocks. |
| Wander | Goes to the directory it is given and reads a file there by a bare name. The only thing that moves the machine from inside a program, and so the only thing that can check the shell puts the working directory back afterwards. | | Wander | Goes to the directory it is given and reads a file there by a bare name. The only thing that moves the machine from inside a program, and so the only thing that can check the shell puts the working directory back afterwards. |
| More | A forward-only pager. Space advances a screen, Return one line, and q stops. | | More | A forward-only pager. Space advances a screen, Return one line, and q stops. A screen is as many lines as the screen has, asked of the rows register rather than assumed - 22 on the forty column mode and 47 on the eighty. |
| Press | Says what the console handed it, in hexadecimal and by name. It reads a line and then keys, because the keys that are not characters are dropped in line mode and delivered in key mode, and both halves of that rule want showing. | | Press | Says what the console handed it, in hexadecimal and by name. It reads a line and then keys, because the keys that are not characters are dropped in line mode and delivered in key mode, and both halves of that rule want showing. |
| Crash | Breaks on purpose, in whichever of the four ways the system now catches, so that a fault screen can be looked at without having written a bug first. | | Crash | Breaks on purpose, in whichever of the four ways the system now catches, so that a fault screen can be looked at without having written a bug first. |
| Mode | Forty columns or eighty, whichever the screen is not in. Ten instructions and no data at all, which is the point of it: it is the smallest shape a loadable program can take, and the loader used to stop the machine dead on one. | | Mode | Forty columns or eighty, whichever the screen is not in. Ten instructions and no data at all, which is the point of it: it is the smallest shape a loadable program can take, and the loader used to stop the machine dead on one. |
+1 -1
View File
@@ -101,7 +101,7 @@ from `make`, not from here.
### 1. Recorded output ### 1. Recorded output
`Tests/run.sh` assembles each program named in `Tests/manifest`, runs it, and compares `Tests/run.sh` assembles each program named in `Tests/manifest`, runs it, and compares
everything it printed against a file in `Tests/expected`. 205 tests, of which 143 run, 35 everything it printed against a file in `Tests/expected`. 206 tests, of which 144 run, 35
only assemble, 16 are expected to fail to assemble, and 11 boot from ROM with no image only assemble, 16 are expected to fail to assemble, and 11 boot from ROM with no image
given at all. given at all.
+107 -27
View File
@@ -24,32 +24,6 @@ line 16: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
finished
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 02: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 03: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 04: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 05: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 06: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 07: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 08: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 09: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 10: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 11: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 12: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 13: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 14: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 15: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 16: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 21: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 21: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 22: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 22: ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -60,6 +34,22 @@ line 26: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 30: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 31: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 32: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 33: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 34: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 35: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 36: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 37: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 38: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 39: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 40: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 41: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 42: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 43: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 44: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
finished finished
> run readable.txt > run readable.txt
first line first line
@@ -84,8 +74,98 @@ line 16: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 21: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 22: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 23: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 24: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 26: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 30: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 31: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 32: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 33: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 34: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 35: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 36: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 37: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 38: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 39: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 40: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 41: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 42: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 43: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 44: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
line 45: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 46: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 47: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 48: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 49: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 50: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 51: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 52: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 53: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 54: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 55: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 56: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 57: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 58: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 59: ABCDEFGHIJKLMNOPQRSTUVWXYZ
finished
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 02: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 03: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 04: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 05: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 06: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 07: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 08: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 09: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 10: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 11: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 12: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 13: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 14: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 15: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 16: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 21: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 22: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 23: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 24: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 26: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 30: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 31: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 32: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 33: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 34: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 35: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 36: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 37: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 38: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 39: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 40: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 41: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 42: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 43: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 44: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
line 45: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more -- -- more --
finished finished
> exit > exit
+37
View File
@@ -0,0 +1,37 @@
CosmOS
> load Mode.sbx
loaded, starting at 5000
> run
40
finished
> load More.sbx
loaded, starting at 5000
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 02: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 03: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 04: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 05: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 06: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 07: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 08: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 09: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 10: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 11: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 12: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 13: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 14: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 15: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 16: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 17: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
finished
> exit
halted
Execution halted.
[exit 0]
+30
View File
@@ -34,6 +34,36 @@ line 26: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 30: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 31: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 32: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 33: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 34: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 35: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 36: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 37: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 38: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 39: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 40: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 41: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 42: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 43: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 44: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 45: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 46: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 47: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 48: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 49: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 50: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 51: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 52: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 53: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 54: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 55: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 56: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 57: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 58: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 59: ABCDEFGHIJKLMNOPQRSTUVWXYZ
finished finished
> run empty.txt > run empty.txt
finished finished
+5
View File
@@ -0,0 +1,5 @@
load Mode.sbx
run
load More.sbx
run readable.txt
qexit
+10 -1
View File
@@ -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 # for the application to mistake for an end marker. The second proves that zero blocks is
# a valid empty file rather than an error. # a valid empty file rather than an error.
"$TOOL" format "$DISKS/type.img" 64 2 >/dev/null "$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 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 : > empty.txt
"$TOOL" put "$DISKS/type.img" readable.txt >/dev/null "$TOOL" put "$DISKS/type.img" readable.txt >/dev/null
"$TOOL" put "$DISKS/type.img" empty.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/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
"$ROOT/Programs/CosmOS/Apps/More.asm" -o "$WORK/More.sbx" >/dev/null "$ROOT/Programs/CosmOS/Apps/More.asm" -o "$WORK/More.sbx" >/dev/null
"$TOOL" put "$DISKS/type.img" "$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 # 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 # distinguish: no blocks, an exact whole block, and a part block. The large pair says the
+10
View File
@@ -522,6 +522,16 @@ cosmosType | CosmOS/Source/cosmos.asm | run | cosmosTyp
# with Space, and one line with Return. The input is intentionally packed so that the one # with Space, and one line with Return. The input is intentionally packed so that the one
# byte the pager consumes leaves the next shell command immediately behind it. # byte the pager consumes leaves the next shell command immediately behind it.
cosmosMore | CosmOS/Source/cosmos.asm | run | cosmosMore.in | - | disks/type.img cosmosMore | CosmOS/Source/cosmos.asm | run | cosmosMore.in | - | disks/type.img
# ---- The same file, on the other screen ----
#
# More shows a screenful less the prompt and asks the rows register how big that is, so the
# page is 47 lines on the eighty column screen and 22 on the forty column one. Mode is run
# first to get there, and it is the only way a test can: nothing else changes the screen.
#
# What this catches is a page size that went back to being a constant. The recording above
# and the recording here are the same file paged two different ways, and a More that had
# stopped asking would make them the same length.
cosmosMoreNarrow | CosmOS/Source/cosmos.asm | run | cosmosMoreNarrow.in | - | disks/type.img
# Copy and Compare exercise both halves of block streaming together. Empty, exact-block, # Copy and Compare exercise both halves of block streaming together. Empty, exact-block,
# part-block and 84,000-byte files are copied through one buffer; Compare checks the copies # part-block and 84,000-byte files are copied through one buffer; Compare checks the copies
# and a same-sized file whose only difference is deep into the input. # and a same-sized file whose only difference is deep into the input.