The shell edits the line it is given

Three different things used to do this job, and which one you got depended on
where the machine was running. On a terminal the host held the line and did the
echoing and the backspacing; behind a window the console's own gatherer did it;
from a file nothing did it at all. One job, three implementations, none of them
in the system - which is why there was no way to move about in a line and
nowhere for a history to live.

So editLine does it. Key mode while a line is being read and line mode straight
after, so nothing else in the system and no program calling osReadLine notices
anything changed. Left and Right, Home and End, Backspace for the character
before the cursor and Delete for the one under it, and anything typed goes in
where the cursor is with the rest of the line moving along.

Ctrl-D means the end of input again, on an empty line, because that was a thing
the terminal did while it was holding the line and it is not holding it now.
Same trade as the echoing.

MOST KEYSTROKES DRAW NOTHING BUT THEMSELVES. A character typed at the end of a
line needs no cursor moved: printing it is the whole change, and a backspace
there is three ordinary bytes. That matters beyond speed - moving the cursor by
hand is what a terminal is TOLD about, in an escape sequence, so redrawing on
every keypress would fill every recorded transcript in this suite with them.
The line is only reprinted when something happened in the middle of it.

Where the line STARTS is worked out backwards from where printing ended, rather
than trusted from what was remembered. That is what makes it survive the screen
scrolling: a line printed on the bottom row moves everything up by one, and a
remembered row would be one too low from then on.

The command line holds 127 characters, up from 63. The limit started to be felt
the moment a line could be moved about in.

58 recordings changed, and every one of them by the echo. THE PROOF IS NOT A
HEURISTIC: a CosmOS built with the echo silenced reproduces 187 of the 188
recordings byte for byte. The one exception is cosmosTyped, the backspace test,
where the rub-out marks now come from the shell instead of from the console's
gatherer - same marks, different author.

cosmosEditKeys is the new test, and every line in it is typed wrong and then
corrected with a different key. Its last line is eighty six characters at a
prompt in column two on an eighty column screen, so the line runs onto the row
below and the shell has to find the start of something it can no longer see;
breaking either half of that arithmetic fails it.

Also: agree.sh looked for "> the same", anchored to a prompt that no longer
precedes what a command prints.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-31 23:01:55 -04:00
co-authored by Claude Opus 5
parent b3726c950a
commit 736037462e
62 changed files with 1220 additions and 291 deletions
+9 -4
View File
@@ -2,15 +2,20 @@ stage two
no /System/Boot/missing.bin
trying the fallback
CosmOS
> saved it
> Files
saved it
read it back, 22 bytes:
a file kept by asking
renamed it
deleted it
and it is gone
finished
> made
> /Notes> 0 files
/Notes> halted
> mkdir Notes
made
> cd Notes
/Notes> dir
0 files
/Notes> exit
halted
Execution halted.
[exit 0]
+9 -4
View File
@@ -1,5 +1,6 @@
CosmOS
> dir list what is on the disk
> help
dir list what is on the disk
load <file> read a program off the disk
run [words] start what was loaded, and tell it those words
<name> [words] look where you are and then in /Apps, and start that
@@ -14,7 +15,8 @@ rename <file> <to> call it something else
monitor look at memory, change it, and jump into it
help this
exit stop, or leave the monitor if you are in it
> greeting.txt 17
> dir
greeting.txt 17
filler1.txt 8
filler2.txt 8
filler3.txt 8
@@ -27,7 +29,10 @@ across.txt 700
empty.txt 0
aName22CharactersLong! 22
12 files
> > I do not know: frobnicate
> halted
>
> frobnicate
I do not know: frobnicate
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,6 +1,8 @@
CosmOS
no filesystem on the disk
> no filesystem on the disk
> halted
> dir
no filesystem on the disk
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,6 +1,9 @@
CosmOS
> drive: nothing this can read is in that drive
> 0
> halted
> drive 1
drive: nothing this can read is in that drive
> drive
0
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> two stops, and what the registers were at each
> load Break.sbx
loaded, starting at 4000
> run
two stops, and what the registers were at each
break at 4016
A 11 B 22 Q 00 status 00
DP0 2030 DP1 2000 DP2 2037 DP3 4000 SP FFFF
@@ -11,6 +13,7 @@ DP0 2000 DP1 2037 DP2 2030 DP3 4000 SP FFF5
press a key
carried on to the end
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+43 -20
View File
@@ -1,27 +1,50 @@
CosmOS
> 0 files
> made
> made
> made
> Apps <dir>
> dir
0 files
> mkdir Apps
made
> mkdir Apps/Deep
made
> mkdir Notes
made
> dir
Apps <dir>
Notes <dir>
0 files, 2 directories
> /Apps> Deep <dir>
> cd Apps
/Apps> dir
Deep <dir>
0 files, 1 directory
/Apps> cannot make that: check the path, the name, and whether it is taken
/Apps> made
/Apps> /Notes> Deep <dir>
/Apps> mkdir Deep
cannot make that: check the path, the name, and whether it is taken
/Apps> mkdir /Notes/Deep
made
/Apps> cd /Notes
/Notes> dir
Deep <dir>
0 files, 1 directory
/Notes> cannot remove that: it must be a directory, and empty
/Notes> removed
/Notes> that is a directory
/Notes> removed
/Notes> > cannot make that: check the path, the name, and whether it is taken
> cannot remove that: it must be a directory, and empty
> cannot remove that: it must be a directory, and empty
> removed
> removed
> 0 files
> halted
/Notes> rmdir /Apps
cannot remove that: it must be a directory, and empty
/Notes> rmdir /Apps/Deep
removed
/Notes> delete /Apps
that is a directory
/Notes> rmdir /Notes/Deep
removed
/Notes> cd /
> mkdir Apps/Deep/Inner
cannot make that: check the path, the name, and whether it is taken
> rmdir Apps/Deep/Inner
cannot remove that: it must be a directory, and empty
> rmdir Apps/Deep
cannot remove that: it must be a directory, and empty
> rmdir Apps
removed
> rmdir Notes
removed
> dir
0 files
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,10 +1,13 @@
CosmOS
> claiming more than was reserved was refused
> Claim
claiming more than was reserved was refused
and the size it really came to was taken
finished
> Claim.sbx 580
> dir
Claim.sbx 580
claim.dat 266
2 files
> halted
> exit
halted
Execution halted.
[exit 0]
+28 -14
View File
@@ -1,30 +1,44 @@
CosmOS
> copied
> Copy /Input/empty.dat /Output/empty.dat
copied
finished
> the same
> Compare /Input/empty.dat /Output/empty.dat
the same
finished
> copied
> Copy /Input/exact.dat /Output/exact.dat
copied
finished
> the same
> Compare /Input/exact.dat /Output/exact.dat
the same
finished
> copied
> Copy /Input/tail.dat /Output/tail.dat
copied
finished
> the same
> Compare /Input/tail.dat /Output/tail.dat
the same
finished
> copied
> Copy /Input/large.dat /Output/large.dat
copied
finished
> the same
> Compare /Input/large.dat /Output/large.dat
the same
finished
> different
> Compare /Input/large.dat /Input/different.dat
different
finished
> copy: cannot find the source
> Copy /Input/missing.dat /Output/missing.dat
copy: cannot find the source
finished
> compare: cannot find the second file
> Compare /Input/large.dat /Input/missing.dat
compare: cannot find the second file
finished
> copy: give me a source and destination
> Copy
copy: give me a source and destination
finished
> compare: give me two files
> Compare /Input/large.dat
compare: give me two files
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+14 -6
View File
@@ -1,11 +1,18 @@
CosmOS
> > copied
> drive 1
> Copy 1:/twoblocks.txt 0:/crossed.txt
copied
finished
> 1
> it says: from drive one
> drive
1
> Say from drive one
it says: from drive one
finished
> 1
> > greet.sbx 211
> drive
1
> cd 0:/
> dir
greet.sbx 211
hello.sbx 53
Life.sbx 1396
Snake.sbx 2164
@@ -26,6 +33,7 @@ inner.script 44
loop.script 35
crossed.txt 560
19 files, 1 directory
> halted
> exit
halted
Execution halted.
[exit 0]
+42 -22
View File
@@ -1,36 +1,56 @@
CosmOS
> Apps <dir>
> dir
Apps <dir>
A <dir>
B <dir>
0 files, 3 directories
> /A> Say.sbx 53
> cd /A
/A> dir
Say.sbx 53
notes.txt 25
2 files
/A> these are the notes in A
finished
/A> /B> and these are the very different notes in B
finished
/B> it says: reached the one in Apps
finished
/B> /A> Hello, World!
finished
/A> > Apps <dir>
A <dir>
B <dir>
0 files, 3 directories
> /B> these are the notes in A
finished
/B> moved, and reading a bare name from there:
/A> Type notes.txt
these are the notes in A
finished
/B> and these are the very different notes in B
/A> cd /B
/B> Type notes.txt
and these are the very different notes in B
finished
/B> no such file
/B> that is not a directory
/B> > Apps <dir>
/B> Say reached the one in Apps
it says: reached the one in Apps
finished
/B> cd /A
/A> Say reached the one in A
Hello, World!
finished
/A> cd ..
> dir
Apps <dir>
A <dir>
B <dir>
0 files, 3 directories
> halted
> cd /B
/B> Type ../A/notes.txt
these are the notes in A
finished
/B> Wander /A
moved, and reading a bare name from there:
these are the notes in A
finished
/B> Type notes.txt
and these are the very different notes in B
finished
/B> cd nosuchplace
no such file
/B> cd notes.txt
that is not a directory
/B> cd /
> dir
Apps <dir>
A <dir>
B <dir>
0 files, 3 directories
> exit
halted
Execution halted.
[exit 0]
+13 -2
View File
@@ -1,5 +1,14 @@
CosmOS
> /abcdefghijklmnopqrst01> /abcdefghijklmnopqrst01/abcdefghijklmnopqrst02> /abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03> /abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04> /abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05> ...opqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06> ...opqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07> ...opqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07/abcdefghijklmnopqrst08> dir list what is on the disk
> cd abcdefghijklmnopqrst01
/abcdefghijklmnopqrst01> cd abcdefghijklmnopqrst02
/abcdefghijklmnopqrst01/abcdefghijklmnopqrst02> cd abcdefghijklmnopqrst03
/abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03> cd abcdefghijklmnopqrst04
/abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04> cd abcdefghijklmnopqrst05
/abcdefghijklmnopqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05> cd abcdefghijklmnopqrst06
...opqrst01/abcdefghijklmnopqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06> cd abcdefghijklmnopqrst07
...opqrst02/abcdefghijklmnopqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07> cd abcdefghijklmnopqrst08
...opqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07/abcdefghijklmnopqrst08> help
dir list what is on the disk
load <file> read a program off the disk
run [words] start what was loaded, and tell it those words
<name> [words] look where you are and then in /Apps, and start that
@@ -14,6 +23,8 @@ rename <file> <to> call it something else
monitor look at memory, change it, and jump into it
help this
exit stop, or leave the monitor if you are in it
...opqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07/abcdefghijklmnopqrst08> > halted
...opqrst03/abcdefghijklmnopqrst04/abcdefghijklmnopqrst05/abcdefghijklmnopqrst06/abcdefghijklmnopqrst07/abcdefghijklmnopqrst08> cd
> exit
halted
Execution halted.
[exit 0]
+17 -6
View File
@@ -1,9 +1,20 @@
CosmOS
> /notes> 1
/notes> > 0
> /2things> 1
/2things> > /2things> 1
/2things> no such file
/2things> halted
> cd 1:/notes
/notes> drive
1
/notes> cd 0:/
> drive
0
> cd 1:/2things
/2things> drive
1
/2things> cd /
> cd 2things
/2things> drive
1
/2things> cd 9:/
no such file
/2things> exit
halted
Execution halted.
[exit 0]
+16 -5
View File
@@ -1,6 +1,8 @@
CosmOS
> 0
> greet.sbx 211
> drive
0
> dir
greet.sbx 211
hello.sbx 53
Life.sbx 1396
Snake.sbx 2164
@@ -20,12 +22,21 @@ outer.script 376
inner.script 44
loop.script 35
18 files, 1 directory
> > other.txt 28
> drive 1
> dir
other.txt 28
notes <dir>
2things <dir>
twoblocks.txt 560
2 files, 2 directories
> /notes> > /notes> > /notes> drive: this machine has no such drive
/notes> halted
> cd /notes
/notes> drive 0
> drive 1
/notes> drive 0
> drive 1
/notes> drive 3
drive: this machine has no such drive
/notes> exit
halted
Execution halted.
[exit 0]
+8 -4
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> poem.txt, new file
> load Edit.sbx
loaded, starting at 4000
> run poem.txt
poem.txt, new file
> : : : : > : : > 1: alpha
2: INSERTED
3: beta
@@ -10,12 +12,14 @@ CosmOS
3: beta
> written, 22 bytes
> finished
> poem.txt, 3 lines
> run poem.txt
poem.txt, 3 lines
> 1: CHANGED
2: INSERTED
3: beta
> there is no such line
> finished
> halted
> exit
halted
Execution halted.
[exit 0]
+17
View File
@@ -0,0 +1,17 @@
CosmOS
> eco okecho ok 
ok
> Xecho okecho ok 
ok
> echo ok
ok
> echo okX 
ok
> echo kecho ok 
ok
> Xecho aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaecho aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa !
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
> exit
halted
Execution halted.
[exit 0]
+12 -6
View File
@@ -1,14 +1,20 @@
CosmOS
> hello.asm, 31 lines
> Edit hello.asm
hello.asm, 31 lines
> finished
> hello.asm, 31 lines
> Edit hello.asm
hello.asm, 31 lines
> finished
> the last program left 0, which is: it did what it was asked
> Status
the last program left 0, which is: it did what it was asked
finished
> a line in it is longer than this can edit, so it has not been opened
> Edit long.txt
a line in it is longer than this can edit, so it has not been opened
finished
> the last program left 1, which is: it did not
> Status
the last program left 1, which is: it did not
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+18 -9
View File
@@ -1,17 +1,26 @@
CosmOS
> one.txt 13
> dir
one.txt 13
two.txt 14
2 files
> renamed
> first.txt 13
> rename one.txt first.txt
renamed
> dir
first.txt 13
two.txt 14
2 files
> gone
> two.txt 14
> delete first.txt
gone
> dir
two.txt 14
1 file
> no such file
> rename what to what?
> there is no such file, or that name is taken
> halted
> delete first.txt
no such file
> rename two.txt
rename what to what?
> rename two.txt two.txt
there is no such file, or that name is taken
> exit
halted
Execution halted.
[exit 0]
+11 -5
View File
@@ -1,10 +1,15 @@
CosmOS
> it says: before Grid
> Say before Grid
it says: before Grid
finished
> finished
> > it says: after Grid
> Grid
finished
>
> Say after Grid
it says: after Grid
finished
> greet.sbx 211
> dir
greet.sbx 211
hello.sbx 53
Life.sbx 1396
Snake.sbx 2164
@@ -24,6 +29,7 @@ outer.script 376
inner.script 44
loop.script 35
18 files, 1 directory
> halted
> exit
halted
Execution halted.
[exit 0]
+8 -4
View File
@@ -1,9 +1,13 @@
CosmOS
> loaded, starting at 4000
> Hello, World!
> load hello.sbx
loaded, starting at 4000
> run
Hello, World!
finished
> Hello, World!
> run
Hello, World!
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+24 -12
View File
@@ -1,22 +1,33 @@
CosmOS
> it says: hello there
> Say hello there
it says: hello there
finished
> it says: spelled out in full
> Say.sbx spelled out in full
it says: spelled out in full
finished
> it says: once more
> run once more
it says: once more
finished
> Say.sbx 156
> dir
Say.sbx 156
dir.sbx 156
notes.txt 21
notes.sbx 21
4 files
> not a program
> not a program
> I do not know: notes.txt
> I do not know: nosuchprogram
> I do not know: abcdefghijklmnopqr
> I do not know: abcdefghijklmnopqrs
> dir list what is on the disk
> notes
not a program
> notes.sbx
not a program
> notes.txt
I do not know: notes.txt
> nosuchprogram
I do not know: nosuchprogram
> abcdefghijklmnopqr
I do not know: abcdefghijklmnopqr
> abcdefghijklmnopqrs
I do not know: abcdefghijklmnopqrs
> help
dir list what is on the disk
load <file> read a program off the disk
run [words] start what was loaded, and tell it those words
<name> [words] look where you are and then in /Apps, and start that
@@ -31,6 +42,7 @@ rename <file> <to> call it something else
monitor look at memory, change it, and jump into it
help this
exit stop, or leave the monitor if you are in it
> halted
> exit
halted
Execution halted.
[exit 0]
+17 -7
View File
@@ -1,19 +1,29 @@
CosmOS
> loaded, starting at 4000
> keys, by interrupt. q stops.
> load Keys.sbx
loaded, starting at 4000
> run
keys, by interrupt. q stops.
ab
the console has been handed back
finished
> > keys, by interrupt. q stops.
>
> run
keys, by interrupt. q stops.
cd
the console has been handed back
finished
> > x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
* bank 00
* FE00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>
> monitor
x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
* b program
bank 00
* x fe00
FE00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FE10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FE20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
FE30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
* > halted
* exit
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
>  #
> load Life.sbx
loaded, starting at 4000
> run
 #
#
###
+6 -3
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
>  #
> load Life.sbx
loaded, starting at 4000
> run
 #
#
###
@@ -19,7 +21,8 @@ CosmOS
stopped
finished
> >
>
>
halted
Execution halted.
[exit 0]
+31 -15
View File
@@ -1,10 +1,16 @@
CosmOS
> x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
* b <program|data|number>
* there is no such bank
* loaded, starting at 4000
* bank 00
* 4000 47 00 20 00 SETD.0 2000
> monitor
x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
* b nonsense
b <program|data|number>
* b 9
there is no such bank
* load greet.sbx
loaded, starting at 4000
* b program
bank 00
* d 4000
4000 47 00 20 00 SETD.0 2000
4004 72 10 SWI 10
4006 47 00 20 44 SETD.0 2044
400A 72 10 SWI 10
@@ -12,23 +18,32 @@ CosmOS
4010 27 1F INIB 1F
4012 72 11 SWI 11
4014 47 00 20 5D SETD.0 205D
* 4000 47 00 20 00 72 10 47 00 20 44 72 10 47 00 20 7A G. .r.G. Dr.G. z
* x 4000
4000 47 00 20 00 72 10 47 00 20 44 72 10 47 00 20 7A G. .r.G. Dr.G. z
4010 27 1F 72 11 47 00 20 5D 72 10 47 00 20 7A 72 10 '.r.G. ]r.G. zr.
4020 47 00 20 65 72 10 20 72 12 00 00 00 00 00 00 00 G. er. r........
4030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
* bank 01
* 2000 61 20 70 72 6F 67 72 61 6D 2C 20 6C 6F 61 64 65 a program, loade
* b data
bank 01
* x 2000
2000 61 20 70 72 6F 67 72 61 6D 2C 20 6C 6F 61 64 65 a program, loade
2010 64 20 6F 66 66 20 61 20 64 69 73 6B 2C 20 72 75 d off a disk, ru
2020 6E 6E 69 6E 67 20 6F 6E 20 74 68 65 20 73 79 73 nning on the sys
2030 74 65 6D 20 74 68 61 74 20 6C 6F 61 64 65 64 20 tem that loaded
* bank 02
* 0000 01 FF 00 00 00 00 00 00 01 FF 00 00 00 00 00 00 ................
* b 2
bank 02
* x 0
0000 01 FF 00 00 00 00 00 00 01 FF 00 00 00 00 00 00 ................
0010 03 FF 08 00 00 00 00 00 01 20 01 00 00 00 00 00 ......... ......
0020 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 ................
0030 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 ................
* that bank will not be written
* bank 00
* * 8000 26 48 INIA 48
* s 0 FF
that bank will not be written
* b program
bank 00
* s 8000 26 48 D1 00 26 0A D1 00 18 12
* d 8000
8000 26 48 INIA 48
8002 D1 00 OUTA 00
8004 26 0A INIA 0A
8006 D1 00 OUTA 00
@@ -36,7 +51,8 @@ CosmOS
8009 12 AND
800A 00 ?
800B 00 ?
* Fault: 0x00 at Program Address 0x800A is not an instruction.
* g 8000Fault: 0x00 at Program Address 0x800A is not an instruction.
H
Execution halted.
[exit 1]
+10 -5
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> first line
> load More.sbx
loaded, starting at 4000
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -24,7 +26,8 @@ line 18: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
finished
> first line
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -58,7 +61,8 @@ line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
finished
> first line
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -84,6 +88,7 @@ line 19: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 20: ABCDEFGHIJKLMNOPQRSTUVWXYZ
-- more --
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+2 -1
View File
@@ -1,6 +1,7 @@
CosmOS
no filesystem on the disk
> no filesystem on the disk
> dir
no filesystem on the disk
>
halted
Execution halted.
+5 -2
View File
@@ -1,5 +1,6 @@
CosmOS
> a line, then keys. q stops.
> Press
a line, then keys. q stops.
61 62 63 64
keys:
80 up
@@ -8,6 +9,8 @@ keys:
5A Z
done
finished
> > halted
>
> exit
halted
Execution halted.
[exit 0]
+5 -2
View File
@@ -1,5 +1,6 @@
CosmOS
> a line, then keys. q stops.
> Press
a line, then keys. q stops.
61 62 63 64
keys:
80 up
@@ -8,6 +9,8 @@ keys:
5A Z
done
finished
> > halted
>
> exit
halted
Execution halted.
[exit 0]
+11 -5
View File
@@ -1,10 +1,16 @@
CosmOS
> > 0 files
> copied
> drive 1
> dir
0 files
> Copy 0:/Say.sbx 1:/Say.sbx
copied
finished
> Say.sbx 156
> dir
Say.sbx 156
1 file
> 1
> halted
> drive
1
> exit
halted
Execution halted.
[exit 0]
+18 -9
View File
@@ -1,6 +1,8 @@
CosmOS
> nothing is loaded
> greet.sbx 211
> run
nothing is loaded
> dir
greet.sbx 211
hello.sbx 53
Life.sbx 1396
Snake.sbx 2164
@@ -20,16 +22,23 @@ outer.script 376
inner.script 44
loop.script 35
18 files, 1 directory
> load what?
> no such file
> not a program
> loaded, starting at 4000
> a program, loaded off a disk, running on the system that loaded it
> load
load what?
> load nosuch.sbx
no such file
> load notes.txt
not a program
> load greet.sbx
loaded, starting at 4000
> run
a program, loaded off a disk, running on the system that loaded it
what should I call you? hello, Anachronaut. that is all I do.
finished
> a program, loaded off a disk, running on the system that loaded it
> run
a program, loaded off a disk, running on the system that loaded it
what should I call you? hello, Claude. that is all I do.
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+10 -5
View File
@@ -1,11 +1,16 @@
CosmOS
> loaded, starting at 4000
> nothing was said
> load Say.sbx
loaded, starting at 4000
> run
nothing was said
finished
> it says: notes.txt
> run notes.txt
it says: notes.txt
finished
> it says: a longer thing with spaces
> run a longer thing with spaces
it says: a longer thing with spaces
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,5 +1,6 @@
CosmOS
> > echo saying what it is doing
> do hi.script
> echo saying what it is doing
saying what it is doing
> Say from a script
it says: from a script
@@ -9,6 +10,7 @@ finished
> Say and again
it says: and again
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+10 -5
View File
@@ -1,13 +1,18 @@
CosmOS
> > Say before
> do bad.script
> Say before
it says: before
finished
> nosuchcommand
I do not know: nosuchcommand
stopped: that line did not work
> do: that is not a script - it wants #! on the first line
> do: cannot find it
> do: give me the name of a script
> halted
> do plain.script
do: that is not a script - it wants #! on the first line
> do nothere.script
do: cannot find it
> do
do: give me the name of a script
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,10 +1,13 @@
CosmOS
> > Say across the block boundary
> do cross.script
> Say across the block boundary
it says: across the block boundary
finished
> > Say with no newline after me
> do nonl.script
> Say with no newline after me
it says: with no newline after me
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,5 +1,6 @@
CosmOS
> > echo outer in block one
> do outer.script
> echo outer in block one
outer in block one
> do inner.script
> echo inner one
@@ -8,7 +9,8 @@ inner one
inner two
> echo outer resumed in block one
outer resumed in block one
> > echo self
> do loop.script
> echo self
self
> do loop.script
> echo self
@@ -22,6 +24,7 @@ self
> do loop.script
do: scripts are only four deep
stopped: that line did not work
> halted
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,12 +1,15 @@
CosmOS
> loaded, starting at 4000
> saved it
> load Files.sbx
loaded, starting at 4000
> run
saved it
read it back, 22 bytes:
a file kept by asking
renamed it
deleted it
and it is gone
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,8 +1,10 @@
CosmOS
this is the fallback: what boot.cfg asks for did not start
> the disk says the last start did not arrive, so this is the fallback
> Settle
the disk says the last start did not arrive, so this is the fallback
settled: the next start will use the configuration again
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,6 +1,8 @@
CosmOS
> already settled: the next start will use the configuration
> Settle
already settled: the next start will use the configuration
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+8 -4
View File
@@ -1,5 +1,6 @@
CosmOS
> greet.sbx 211
> dir
greet.sbx 211
hello.sbx 53
Life.sbx 1396
Snake.sbx 2164
@@ -19,9 +20,12 @@ outer.script 376
inner.script 44
loop.script 35
18 files, 1 directory
> loaded, starting at 4000
> it says: the disk took its time
> load Say.sbx
loaded, starting at 4000
> run the disk took its time
it says: the disk took its time
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> +----------------+
> load Snake.sbx
loaded, starting at 4000
> run
+----------------+
| |
| |
| |
+6 -3
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> ; This is a basic hello world program for the SplitBit CPU.
> load readTest.sbx
loaded, starting at 4000
> run hello.asm
; This is a basic hello world program for the SplitBit CPU.
; We'll create a loop that outputs each byte of our string to Output 0, the text console.
#Program
@@ -22,6 +24,7 @@ End:
"Hello, World!"
---- lines: 21
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+5 -2
View File
@@ -4,7 +4,10 @@ CosmOS ready.
> echo and loud again
and loud again
and quiet again at the end
> > typed by hand
> halted
> clear
> echo typed by hand
typed by hand
> exit
halted
Execution halted.
[exit 0]
+5 -2
View File
@@ -1,6 +1,9 @@
CosmOS
startup.sh is there but does not begin with #!, so it was not run
> > typed by hand
> halted
> clear
> echo typed by hand
typed by hand
> exit
halted
Execution halted.
[exit 0]
+14 -7
View File
@@ -1,16 +1,23 @@
CosmOS
> it says: it worked
> Say it worked
it says: it worked
finished
> the last program left 0, which is: it did what it was asked
> Status
the last program left 0, which is: it did what it was asked
finished
> type: give me a file name
> Type
type: give me a file name
finished
> the last program left 2, which is: it was asked wrongly
> Status
the last program left 2, which is: it was asked wrongly
finished
> type: cannot find the file, error 2
> Type /nothing/here.txt
type: cannot find the file, error 2
finished
> the last program left 1, which is: it did not
> Status
the last program left 1, which is: it did not
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> big.txt is 329 blocks
> load Stream.sbx
loaded, starting at 4000
> run
big.txt is 329 blocks
read 329 blocks, checksum 57368, stopped with 3
small.txt streamed is 15216, read whole is 15216
the same
@@ -11,6 +13,7 @@ the new name answers 0
a name that was never there answers 2
a block past the end answers 3
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> 4 keyword 0 [#Program]
> load tokenTest.sbx
loaded, starting at 4000
> run hello.asm
4 keyword 0 [#Program]
6 label: 0 [Start:]
7 instr 2 [LDA]
8 instr 1 [BRA]
@@ -20,6 +22,7 @@ CosmOS
20 string 14 [Hello, World!]
---- no more tokens
finished
> halted
> exit
halted
Execution halted.
[exit 0]
+38 -19
View File
@@ -1,30 +1,49 @@
CosmOS
> Apps <dir>
> dir
Apps <dir>
rooted.txt 21
1 file, 1 directory
> loaded, starting at 4000
> it says: the shallow one
> load /Apps/Say.sbx
loaded, starting at 4000
> run the shallow one
it says: the shallow one
finished
> loaded, starting at 4000
> Hello, World!
> load /Apps/Deep/Say.sbx
loaded, starting at 4000
> run the deep one
Hello, World!
finished
> loaded, starting at 4000
> it says: the shallow one again
> load /Apps/./Deep/../Say.sbx
loaded, starting at 4000
> run the shallow one again
it says: the shallow one again
finished
> loaded, starting at 4000
> Hello, World!
> load /Apps/Deep/../../Apps/./Deep/Say.sbx
loaded, starting at 4000
> run the deep one the long way round
Hello, World!
finished
> no such file
> no such file
> that is a directory
> no such file
> no such file
> no such file
> that is a directory
> gone
> Apps <dir>
> load /rooted.txt/Say.sbx
no such file
> load /Apps/Missing/Say.sbx
no such file
> load /Apps
that is a directory
> load /Apps/abcdefghijklmnopqrstuvw
no such file
> load /
no such file
> load /Apps/Deep/../..
no such file
> delete /Apps
that is a directory
> delete /Apps/Deep/Say.sbx
gone
> dir
Apps <dir>
rooted.txt 21
1 file, 1 directory
> halted
> exit
halted
Execution halted.
[exit 0]
+10 -5
View File
@@ -1,15 +1,20 @@
CosmOS
> Folder <dir>
> dir
Folder <dir>
Edit.sbx 2243
1 file, 1 directory
> loaded, starting at 4000
> note.txt, new file
> load Edit.sbx
loaded, starting at 4000
> run note.txt
note.txt, new file
> : : : > written, 67 bytes
> finished
> Folder <dir>
> dir
Folder <dir>
Edit.sbx 2243
note.txt 67
2 files, 1 directory
> halted
> exit
halted
Execution halted.
[exit 0]
+12 -6
View File
@@ -1,6 +1,8 @@
CosmOS
> loaded, starting at 4000
> first line
> load Type.sbx
loaded, starting at 4000
> run readable.txt
first line
second line
line 00: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 01: ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -33,11 +35,15 @@ line 27: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 28: ABCDEFGHIJKLMNOPQRSTUVWXYZ
line 29: ABCDEFGHIJKLMNOPQRSTUVWXYZ
finished
> finished
> type: cannot find the file, error 2
> run empty.txt
finished
> type: give me a file name
> run missing.txt
type: cannot find the file, error 2
finished
> halted
> run
type: give me a file name
finished
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,5 +1,6 @@
CosmOS
> dir list what is on the disk
> halp   melp    elp
dir list what is on the disk
load <file> read a program off the disk
run [words] start what was loaded, and tell it those words
<name> [words] look where you are and then in /Apps, and start that
@@ -14,6 +15,7 @@ rename <file> <to> call it something else
monitor look at memory, change it, and jump into it
help this
exit stop, or leave the monitor if you are in it
> halted
> exit
halted
Execution halted.
[exit 0]
+6 -3
View File
@@ -1,9 +1,12 @@
CosmOS
> next start: /System/Boot/bare.bin, once
> Once /System/Boot/bare.bin
next start: /System/Boot/bare.bin, once
finished
> System <dir>
> dir /System/Boot
System <dir>
Apps <dir>
0 files, 2 directories
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,6 +1,8 @@
CosmOS
> starting again
> Reboot
starting again
CosmOS
> halted
> exit
halted
Execution halted.
[exit 0]
+4 -2
View File
@@ -1,8 +1,10 @@
stage two
CosmOS
> next start: /System/Boot/bare.bin, once
> Once /System/Boot/bare.bin
next start: /System/Boot/bare.bin, once
finished
> starting again
> Reboot
starting again
stage two
just this once: /System/Boot/bare.bin
bare metal: no system, just this
+9 -4
View File
@@ -1,14 +1,19 @@
stage two
CosmOS
> saved it
> Files
saved it
read it back, 22 bytes:
a file kept by asking
renamed it
deleted it
and it is gone
finished
> cannot make that: check the path, the name, and whether it is taken
> /Notes> 0 files
/Notes> halted
> mkdir Notes
cannot make that: check the path, the name, and whether it is taken
> cd Notes
/Notes> dir
0 files
/Notes> exit
halted
Execution halted.
[exit 0]
+9 -4
View File
@@ -1,14 +1,19 @@
stage two
CosmOS
> saved it
> Files
saved it
read it back, 22 bytes:
a file kept by asking
renamed it
deleted it
and it is gone
finished
> made
> /Notes> 0 files
/Notes> halted
> mkdir Notes
made
> cd Notes
/Notes> dir
0 files
/Notes> exit
halted
Execution halted.
[exit 0]