Give the system another page of each memory

CosmOS had 1,161 bytes of Program Memory left before the address applications
load at, and Tab completion is not going to fit in that with anything to spare.
So the wall moves up one page: the system keeps below 0x4FFF and 0x2FFF, and an
application is based at 0x5000 and 0x3000.

A PAGE IS A CHEAP THING TO GIVE IT AND AN EXPENSIVE THING TO RUN OUT OF. An
application still has 44K of Program Memory before the vector table and the
largest one here uses 7.5K, so what was taken from applications is space nothing
has ever asked for - while what the system gained is the difference between
building the next thing and counting bytes while building it.

Not doubling, which was the version that would have cost application space worth
minding. One page, and the same again when it is needed.

Nothing in the machine knows where the wall is, so this is 34 #Base lines, one
threshold in the fault handler, and the table in the CosmOS README that
Tests/docs.sh reads its limits out of.

The native assembler's scratch map had to move with it, and docs.sh said so
before anything ran: its data reached 0x40D6 and its buffers began at 0x4000, so
they were sitting on its variables. That file already carries a paragraph about
the floor coming up and the map staying where it was. It has happened twice now,
and been caught by a check the first time wrote.

Twenty three recordings are the same runs a page higher.

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-01 16:49:12 -04:00
co-authored by Claude Opus 5
parent f97d15de08
commit 3449405b18
59 changed files with 148 additions and 140 deletions
+2 -2
View File
@@ -39,7 +39,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Banner SETD.0 Banner
@@ -72,7 +72,7 @@ deeper:
#Data #Data
#Base 0x2000 #Base 0x3000
Banner: Banner:
"two stops, and what the registers were at each "two stops, and what the registers were at each
+2 -2
View File
@@ -19,7 +19,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; One block, and ten bytes after it. ; One block, and ten bytes after it.
@@ -81,7 +81,7 @@ noWrite:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Name: Name:
"claim.dat" "claim.dat"
+2 -2
View File
@@ -9,7 +9,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Arguments SETD.0 Arguments
@@ -236,7 +236,7 @@ secondReadFailed:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Arguments: Arguments:
#Reserve 0d256 #Reserve 0d256
+2 -2
View File
@@ -14,7 +14,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Arguments SETD.0 Arguments
@@ -232,7 +232,7 @@ doneFailed:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Arguments: Arguments:
#Reserve 0d256 #Reserve 0d256
+2 -2
View File
@@ -21,7 +21,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Argument SETD.0 Argument
@@ -124,7 +124,7 @@ crashWait:
#Data #Data
#Base 0x2000 #Base 0x3000
WordOpcode: WordOpcode:
"opcode" "opcode"
+2 -2
View File
@@ -51,7 +51,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; ---- Room for a PATH, not a name ---- ; ---- Room for a PATH, not a name ----
@@ -869,7 +869,7 @@ addByteToWord:
#Data #Data
#Base 0x2000 #Base 0x3000
Break: Break:
0x0A 0x00 0x0A 0x00
+2 -2
View File
@@ -4,7 +4,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; Swap ValueB and ValueA. ; Swap ValueB and ValueA.
@@ -72,7 +72,7 @@ start:
#Data #Data
#Base 0x2000 #Base 0x3000
ValueA: ValueA:
; Low byte, high byte. ; Low byte, high byte.
+2 -2
View File
@@ -4,7 +4,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; Swap ValueB and ValueA. ; Swap ValueB and ValueA.
@@ -128,7 +128,7 @@ start:
#Data #Data
#Base 0x2000 #Base 0x3000
ValueA: ValueA:
; Lowest byte ... Highest byte. ; Lowest byte ... Highest byte.
+2 -2
View File
@@ -4,7 +4,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; Load our initial values into A and B. ; Load our initial values into A and B.
@@ -38,6 +38,6 @@ start:
#Data #Data
#Base 0x2000 #Base 0x3000
#Include print.asm #Include print.asm
+2 -2
View File
@@ -24,7 +24,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; ---- Write it ---- ; ---- Write it ----
@@ -133,7 +133,7 @@ noDelete:
#Data #Data
#Base 0x2000 #Base 0x3000
Name: Name:
"kept.txt" "kept.txt"
+2 -2
View File
@@ -23,7 +23,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; ---- Reaching video memory ---- ; ---- Reaching video memory ----
@@ -411,7 +411,7 @@ everyCell:
#Data #Data
#Base 0x2000 #Base 0x3000
ScreenKept: ScreenKept:
0x00 0x00
+2 -2
View File
@@ -17,7 +17,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
CIF ; Nothing arrives until there is something to catch it. CIF ; Nothing arrives until there is something to catch it.
@@ -85,7 +85,7 @@ keyStop:
#Data #Data
#Base 0x2000 #Base 0x3000
Banner: Banner:
"keys, by interrupt. q stops." "keys, by interrupt. q stops."
+2 -2
View File
@@ -32,7 +32,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
CALL seedGlider CALL seedGlider
@@ -350,7 +350,7 @@ delayDone:
#Data #Data
#Base 0x2000 #Base 0x3000
RowCount: RowCount:
0x00 0x00
+1 -1
View File
@@ -23,7 +23,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
INA 0x31 ; Which mode the screen is in now. INA 0x31 ; Which mode the screen is in now.
+2 -2
View File
@@ -8,7 +8,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Name SETD.0 Name
@@ -139,7 +139,7 @@ finished:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Usage: Usage:
"more: give me a file name "more: give me a file name
" "
+2 -2
View File
@@ -25,7 +25,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Wanted SETD.0 Wanted
@@ -114,7 +114,7 @@ measureDone:
#Data #Data
#Base 0x2000 #Base 0x3000
Prefix: Prefix:
"system " "system "
+2 -2
View File
@@ -12,7 +12,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Argument SETD.0 Argument
@@ -213,7 +213,7 @@ doneFailed:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Name: Name:
"poured.dat" "poured.dat"
+2 -2
View File
@@ -19,7 +19,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 LineText SETD.0 LineText
@@ -141,7 +141,7 @@ keySay:
#Data #Data
#Base 0x2000 #Base 0x3000
LineText: LineText:
"a line, then keys. q stops." "a line, then keys. q stops."
+2 -2
View File
@@ -27,7 +27,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Saying SETD.0 Saying
@@ -45,7 +45,7 @@ start:
#Data #Data
#Base 0x2000 #Base 0x3000
Saying: Saying:
"starting again "starting again
+2 -2
View File
@@ -16,7 +16,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Given SETD.0 Given
@@ -45,7 +45,7 @@ sayEnd:
#Data #Data
#Base 0x2000 #Base 0x3000
SaidText: SaidText:
"it says: " "it says: "
+2 -2
View File
@@ -23,7 +23,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SWI osBootState SWI osBootState
@@ -71,7 +71,7 @@ alreadySettled:
#Data #Data
#Base 0x2000 #Base 0x3000
WasTrying: WasTrying:
"the disk says a start is still in progress "the disk says a start is still in progress
+2 -2
View File
@@ -9,7 +9,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
RSTA RSTA
@@ -140,7 +140,7 @@ printCandidateHex:
#Data #Data
#Base 0x2000 #Base 0x3000
; Segment has to begin on a page boundary, and now says so itself rather than relying on ; Segment has to begin on a page boundary, and now says so itself rather than relying on
; whatever happens to have been assembled before it. The marking loop adds the prime to ; whatever happens to have been assembled before it. The marking loop adds the prime to
+2 -2
View File
@@ -4,7 +4,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; Search the list until we find a prime. ; Search the list until we find a prime.
@@ -46,7 +46,7 @@ start:
#Data #Data
#Base 0x2000 #Base 0x3000
; The table of our prime candidates. It has to begin on a page boundary: marking walks ; The table of our prime candidates. It has to begin on a page boundary: marking walks
; the pointer's low byte and treats the carry out as running off the end of the table, ; the pointer's low byte and treats the carry out as running off the end of the table,
+2 -2
View File
@@ -38,7 +38,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; The two pointers whose low byte is a square number. Both regions are page aligned, so ; The two pointers whose low byte is a square number. Both regions are page aligned, so
@@ -615,7 +615,7 @@ pauseInner:
#Data #Data
#Base 0x2000 #Base 0x3000
HeadCell: HeadCell:
0x00 0x00
+2 -2
View File
@@ -18,7 +18,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SWI osLastStatus SWI osLastStatus
@@ -70,7 +70,7 @@ done:
#Data #Data
#Base 0x2000 #Base 0x3000
Prefix: Prefix:
"the last program left " "the last program left "
+2 -2
View File
@@ -36,7 +36,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; ---- 1. How big is something that will not fit ---- ; ---- 1. How big is something that will not fit ----
@@ -408,7 +408,7 @@ printWhy:
#Data #Data
#Base 0x2000 #Base 0x3000
BigName: BigName:
"big.txt" "big.txt"
+2 -2
View File
@@ -6,7 +6,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Name SETD.0 Name
@@ -70,7 +70,7 @@ finished:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Usage: Usage:
"type: give me a file name "type: give me a file name
" "
+2 -2
View File
@@ -10,7 +10,7 @@
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
; Where to go is the argument. Nothing else about this program says a directory name, so ; Where to go is the argument. Nothing else about this program says a directory name, so
@@ -85,7 +85,7 @@ noFile:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Where: Where:
#Reserve 0d64 #Reserve 0d64
+2 -2
View File
@@ -17,7 +17,7 @@
#Program #Program
#Base 0x4000 ; Above the system, which keeps below here. #Base 0x5000 ; Above the system, which keeps below here.
greet: greet:
SETD.0 Opening SETD.0 Opening
@@ -44,7 +44,7 @@ greet:
#Data #Data
#Base 0x2000 ; And its data above the system's. #Base 0x3000 ; And its data above the system's.
Opening: Opening:
"a program, loaded off a disk, running on the system that loaded it "a program, loaded off a disk, running on the system that loaded it
+2 -2
View File
@@ -6,7 +6,7 @@
#Program #Program
#Base 0x4000 ; Change two: #Base 0x5000 ; Change two:
SETD hello ; Change three SETD hello ; Change three
Start: Start:
@@ -26,6 +26,6 @@ End:
#Data #Data
#Base 0x2000 ; Five, adjust the base of the data segment. #Base 0x3000 ; Five, adjust the base of the data segment.
hello: ; Throw a label here so we can explicitly point at this data. Six, actually. hello: ; Throw a label here so we can explicitly point at this data. Six, actually.
"Hello, World!" "Hello, World!"
+2 -2
View File
@@ -38,7 +38,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Argument SETD.0 Argument
@@ -2180,7 +2180,7 @@ report:
#Data #Data
#Base 0x2000 #Base 0x3000
Argument: Argument:
#Reserve 0d23 #Reserve 0d23
+2 -2
View File
@@ -14,7 +14,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Wanted SETD.0 Wanted
@@ -60,7 +60,7 @@ noFile:
#Data #Data
#Base 0x2000 #Base 0x3000
Wanted: Wanted:
#Reserve 0d23 #Reserve 0d23
+17 -11
View File
@@ -12,7 +12,7 @@
; ;
; None of this is initialised data. It is scratch, wanted only while the assembler is ; None of this is initialised data. It is scratch, wanted only while the assembler is
; running, and while it is running everything above its own data is free: the system keeps ; running, and while it is running everything above its own data is free: the system keeps
; below 0x1FFF, the staging area is only in use during a load, and the Stack comes down ; below 0x2FFF, the staging area is only in use during a load, and the Stack comes down
; from the top. So the addresses are written down here and the file carries none of it. ; from the top. So the addresses are written down here and the file carries none of it.
; ;
; That sentence said 0x1000 for a while after the system's half of Data Memory was ; That sentence said 0x1000 for a while after the system's half of Data Memory was
@@ -20,10 +20,10 @@
; bad enough; a stale number sitting next to the correction is worse, because whichever ; bad enough; a stale number sitting next to the correction is worse, because whichever
; one a reader takes is a coin toss. ; one a reader takes is a coin toss.
; ;
; 0x4000 6144 the label index, 1536 entries of four ; 0x5000 6144 the label index, 1536 entries of four
; 0x5800 16384 the label names, packed end to end ; 0x6800 16384 the label names, packed end to end
; 0x9800 256 one block of the output file, on its way to the disk ; 0xA800 256 one block of the output file, on its way to the disk
; 0x9900 18176 free ; 0xA900 17152 free
; 0xE000 1792 the vector names, 64 entries of twenty eight ; 0xE000 1792 the vector names, 64 entries of twenty eight
; 0xE700 2048 the reader's stack, six levels of 301 ; 0xE700 2048 the reader's stack, six levels of 301
; 0xEF00 368 which files have been included, sixteen names of 23 ; 0xEF00 368 which files have been included, sixteen names of 23
@@ -35,9 +35,15 @@
; and the map stayed where it was, leaving sixteen kilobytes between the two that nothing ; and the map stayed where it was, leaving sixteen kilobytes between the two that nothing
; touched. ; touched.
; ;
; Starting at 0x4000 takes that back. The assembler's data is a little over four kilobytes ; Starting above the assembler's own data takes that back. It began at 0x4000 with the data
; from 0x2000, so there is still nearly four kilobytes of slack in front of this - and room ; from 0x2000, and moved to 0x5000 when the system was given another page and every
; for its data to double before the two would meet. `make test` measures that gap now ; application's data moved to 0x3000 with it - THE FLOOR CAME UP A SECOND TIME, exactly as
; the paragraph above says it did the first, and this time the check below said so before
; anything ran: the assembler's data reached 0x40D6 and the index began at 0x4000, so the
; buffers were sitting on the variables.
;
; There is still nearly four kilobytes of slack in front of this, and room for the data to
; double before the two would meet. `make test` measures that gap now
; rather than trusting this paragraph, and measures the floor above as well, because both ; rather than trusting this paragraph, and measures the floor above as well, because both
; of those numbers describe the machine AROUND this file and neither is enforced by a line ; of those numbers describe the machine AROUND this file and neither is enforced by a line
; of code anywhere. ; of code anywhere.
@@ -77,11 +83,11 @@
; second is bigger than the first, which is worth knowing: the hardest thing this assembles ; second is bigger than the first, which is worth knowing: the hardest thing this assembles
; is not the operating system, it is itself. ; is not the operating system, it is itself.
ScratchLabIndex: ScratchLabIndex:
0x40 0x00 0x50 0x00
ScratchLabArena: ScratchLabArena:
0x58 0x00 0x68 0x00
ScratchWindow: ScratchWindow:
0x98 0x00 0xA8 0x00
ScratchVecNames: ScratchVecNames:
0xE0 0x00 0xE0 0x00
ScratchSrcStack: ScratchSrcStack:
+2 -2
View File
@@ -15,7 +15,7 @@
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Wanted SETD.0 Wanted
@@ -128,7 +128,7 @@ noFile:
#Data #Data
#Base 0x2000 #Base 0x3000
Wanted: Wanted:
#Reserve 0d23 #Reserve 0d23
+13 -5
View File
@@ -847,16 +847,24 @@ CosmOS divides the two SplitBit address spaces by convention:
| Memory | CosmOS | Loaded application | | Memory | CosmOS | Loaded application |
| -- | -- | -- | | -- | -- | -- |
| Program Memory | `0x0000` through `0x3FFF` | `0x4000` and above | | Program Memory | `0x0000` through `0x4FFF` | `0x5000` and above |
| Data Memory | `0x0000` through `0x1FFF` | `0x2000` and above | | Data Memory | `0x0000` through `0x2FFF` | `0x3000` and above |
Both of CosmOS's halves were doubled once it outgrew the first ones. **The division is a CosmOS's halves have been enlarged twice: doubled once when it outgrew the first ones, and
given a page each when the shell learned to edit and remember a line. **The division is a
convention and nothing enforced it**, so CosmOS quietly grew past `0x1FFF` and the next convention and nothing enforced it**, so CosmOS quietly grew past `0x1FFF` and the next
program loaded landed on top of its own code - which does not fail where it happens, it program loaded landed on top of its own code - which does not fail where it happens, it
fails later, in whatever part of the shell the program happened to cover. `make test` now fails later, in whatever part of the shell the program happened to cover. `make test` now
measures both segments against the numbers in this table, so the table is checked rather measures both segments against the numbers in this table, so the table is checked rather
than merely written down. than merely written down.
**A page is a cheap thing to give it and an expensive thing to run out of.** An application
still has 44K of Program Memory before the vector table, and the largest one here uses 7.5K,
so the space taken from applications is space nothing has ever asked for - while the space
given to the system is the difference between building the next thing and counting bytes
while building it. Moving the wall costs a `#Base` line in each application and a rebuild;
that is the whole of it, because nothing in the machine knows where the wall is.
**The table is checked against itself as well.** The first version of that check read only **The table is checked against itself as well.** The first version of that check read only
the CosmOS column, and so it passed a table whose Data row gave the system `0x3FFF` and an the CosmOS column, and so it passed a table whose Data row gave the system `0x3FFF` and an
application `0x2000` - two columns that cannot both be true, sitting next to each other. application `0x2000` - two columns that cannot both be true, sitting next to each other.
@@ -890,7 +898,7 @@ A minimal CosmOS application therefore looks like this:
#Include services.asm #Include services.asm
#Program #Program
#Base 0x4000 #Base 0x5000
start: start:
SETD.0 Message SETD.0 Message
@@ -898,7 +906,7 @@ start:
SWI osExit SWI osExit
#Data #Data
#Base 0x2000 #Base 0x3000
Message: Message:
"Hello from CosmOS." "Hello from CosmOS."
+5 -5
View File
@@ -10,10 +10,10 @@
; The system keeps to the bottom of both memories, and everything above is for whatever ; The system keeps to the bottom of both memories, and everything above is for whatever
; it is running: ; it is running:
; ;
; Program Memory 0x0000 - 0x3FFF the system ; Program Memory 0x0000 - 0x4FFF the system
; 0x4000 - a loaded program's code ; 0x5000 - a loaded program's code
; Data Memory 0x0000 - 0x1FFF the system ; Data Memory 0x0000 - 0x2FFF the system
; 0x2000 - a loaded program's data ; 0x3000 - a loaded program's data
; ;
; Nothing enforces that. Nothing can: the fence guards a range, and this is a convention ; Nothing enforces that. Nothing can: the fence guards a range, and this is a convention
; about which range belongs to whom rather than a rule about what may be touched. The ; about which range belongs to whom rather than a rule about what may be touched. The
@@ -1384,7 +1384,7 @@ faultWhere:
POPD.0 POPD.0
DPUP.0 0d13 DPUP.0 0d13
LDA.0 LDA.0
INIB 0x40 INIB 0x50
CCF CCF
SUB SUB
BRC faultInSystem BRC faultInSystem
+1 -7
View File
@@ -37,10 +37,6 @@
#Program #Program
#Include services.asm
#Base 0x4000
start: start:
; ---- The instrument ---- ; ---- The instrument ----
@@ -186,7 +182,7 @@ lastRing:
CIF CIF
RSTA RSTA
OUTA 0x35 OUTA 0x35
SWI osExit HALT
; Sixty times a second, and it has nothing to do. WAIT only needs something to have happened, ; Sixty times a second, and it has nothing to do. WAIT only needs something to have happened,
; and this is the something. A handler still has to exist: an interrupt with nothing installed ; and this is the something. A handler still has to exist: an interrupt with nothing installed
@@ -196,8 +192,6 @@ frame:
#Data #Data
#Base 0x2000
; ---- Notes and how long they last ---- ; ---- Notes and how long they last ----
; ;
; Pairs: a MIDI note, then a count of frames. 60 is middle C and every 12 is an octave. A zero ; Pairs: a MIDI note, then a count of frames. 60 is middle C and every 12 is an octave. A zero
+5 -5
View File
@@ -1,15 +1,15 @@
CosmOS CosmOS
> load Break.sbx > load Break.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
two stops, and what the registers were at each two stops, and what the registers were at each
break at 4016 break at 5016
A 11 B 22 Q 00 status 00 A 11 B 22 Q 00 status 00
DP0 2030 DP1 2000 DP2 2037 DP3 4000 SP FFFF DP0 3030 DP1 3000 DP2 3037 DP3 5000 SP FFFF
press a key press a key
break at 4034 break at 5034
A 44 B 55 Q 00 status 00 A 44 B 55 Q 00 status 00
DP0 2000 DP1 2037 DP2 2030 DP3 4000 SP FFF5 DP0 3000 DP1 3037 DP2 3030 DP3 5000 SP FFF5
press a key press a key
carried on to the end carried on to the end
finished finished
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Edit.sbx > load Edit.sbx
loaded, starting at 4000 loaded, starting at 5000
> run poem.txt > run poem.txt
poem.txt, new file poem.txt, new file
> a > a
+1 -1
View File
@@ -2,7 +2,7 @@ CosmOS
> echo remembered by the shell > echo remembered by the shell
remembered by the shell remembered by the shell
> load Edit.sbx > load Edit.sbx
loaded, starting at 4000 loaded, starting at 5000
> run typed.txt > run typed.txt
typed.txt, new file typed.txt, new file
> a > a
+4 -4
View File
@@ -1,18 +1,18 @@
CosmOS CosmOS
> Crash opcode > Crash opcode
that byte is not an instruction, at 4081 that byte is not an instruction, at 5081
A 00 B 0F Q 00 A 00 B 0F Q 00
the program was stopped the program was stopped
> Crash service > Crash service
nothing is installed at service 28, at 4084 nothing is installed at service 28, at 5084
A 00 B 0F Q 00 A 00 B 0F Q 00
the program was stopped the program was stopped
> Crash bank > Crash bank
a bank that is not there, or an address past its end, at 409E a bank that is not there, or an address past its end, at 509E
A 01 B 0F Q 00 A 01 B 0F Q 00
the program was stopped the program was stopped
> Crash device > Crash device
nothing is installed for the device on port 00, at 40A5 nothing is installed for the device on port 00, at 50A5
A 02 B 0F Q 00 A 02 B 0F Q 00
the program was stopped the program was stopped
> Crash sideways > Crash sideways
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load hello.sbx > load hello.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
Hello, World! Hello, World!
finished finished
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Keys.sbx > load Keys.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
keys, by interrupt. q stops. keys, by interrupt. q stops.
ab ab
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Life.sbx > load Life.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
 #  #
# #
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Life.sbx > load Life.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
 #  #
# #
+16 -16
View File
@@ -6,30 +6,30 @@ b <program|data|number>
* b 9 * b 9
there is no such bank there is no such bank
* load greet.sbx * load greet.sbx
loaded, starting at 4000 loaded, starting at 5000
* b program * b program
bank 00 bank 00
* d 4000 * d 4000
4000 47 00 20 00 SETD.0 2000 4000 00 ?
4004 72 10 SWI 10 4001 00 ?
4006 47 00 20 44 SETD.0 2044 4002 00 ?
400A 72 10 SWI 10 4003 00 ?
400C 47 00 20 7A SETD.0 207A 4004 00 ?
4010 27 1F INIB 1F 4005 00 ?
4012 72 11 SWI 11 4006 00 ?
4014 47 00 20 5D SETD.0 205D 4007 00 ?
* x 4000 * 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 4000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4010 27 1F 72 11 47 00 20 5D 72 10 47 00 20 7A 72 10 '.r.G. ]r.G. zr. 4010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4020 47 00 20 65 72 10 20 72 12 00 00 00 00 00 00 00 G. er. r........ 4020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 4030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
* b data * b data
bank 01 bank 01
* x 2000 * x 2000
2000 61 20 70 72 6F 67 72 61 6D 2C 20 6C 6F 61 64 65 a program, loade 2000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2010 64 20 6F 66 66 20 61 20 64 69 73 6B 2C 20 72 75 d off a disk, ru 2010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2020 6E 6E 69 6E 67 20 6F 6E 20 74 68 65 20 73 79 73 nning on the sys 2020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2030 74 65 6D 20 74 68 61 74 20 6C 6F 61 64 65 64 20 tem that loaded 2030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
* b 2 * b 2
bank 02 bank 02
* x 0 * x 0
+1 -1
View File
@@ -5,7 +5,7 @@ x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
it says: hello from the monitor it says: hello from the monitor
finished finished
* Crash opcode * Crash opcode
that byte is not an instruction, at 4081 that byte is not an instruction, at 5081
A 00 B 0F Q 00 A 00 B 0F Q 00
the program was stopped the program was stopped
* nonsense * nonsense
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load More.sbx > load More.sbx
loaded, starting at 4000 loaded, starting at 5000
> run readable.txt > run readable.txt
first line first line
second line second line
+1 -1
View File
@@ -31,7 +31,7 @@ no such file
> load notes.txt > load notes.txt
not a program not a program
> load greet.sbx > load greet.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
a program, loaded off a disk, running on the system that loaded it a program, loaded off a disk, running on the system that loaded it
what should I call you? Anachronaut what should I call you? Anachronaut
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Say.sbx > load Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
nothing was said nothing was said
finished finished
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Files.sbx > load Files.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
saved it saved it
read it back, 22 bytes: read it back, 22 bytes:
+1 -1
View File
@@ -23,7 +23,7 @@ inner.script 44
loop.script 35 loop.script 35
20 files, 1 directory 20 files, 1 directory
> load Say.sbx > load Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run the disk took its time > run the disk took its time
it says: the disk took its time it says: the disk took its time
finished finished
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Snake.sbx > load Snake.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
+----------------+ +----------------+
| | | |
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load readTest.sbx > load readTest.sbx
loaded, starting at 4000 loaded, starting at 5000
> run hello.asm > run hello.asm
; This is a basic hello world program for the SplitBit CPU. ; 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. ; We'll create a loop that outputs each byte of our string to Output 0, the text console.
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Stream.sbx > load Stream.sbx
loaded, starting at 4000 loaded, starting at 5000
> run > run
big.txt is 329 blocks big.txt is 329 blocks
read 329 blocks, checksum 57368, stopped with 3 read 329 blocks, checksum 57368, stopped with 3
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load tokenTest.sbx > load tokenTest.sbx
loaded, starting at 4000 loaded, starting at 5000
> run hello.asm > run hello.asm
4 keyword 0 [#Program] 4 keyword 0 [#Program]
6 label: 0 [Start:] 6 label: 0 [Start:]
+4 -4
View File
@@ -4,22 +4,22 @@ Apps <dir>
rooted.txt 21 rooted.txt 21
1 file, 1 directory 1 file, 1 directory
> load /Apps/Say.sbx > load /Apps/Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run the shallow one > run the shallow one
it says: the shallow one it says: the shallow one
finished finished
> load /Apps/Deep/Say.sbx > load /Apps/Deep/Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run the deep one > run the deep one
Hello, World! Hello, World!
finished finished
> load /Apps/./Deep/../Say.sbx > load /Apps/./Deep/../Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run the shallow one again > run the shallow one again
it says: the shallow one again it says: the shallow one again
finished finished
> load /Apps/Deep/../../Apps/./Deep/Say.sbx > load /Apps/Deep/../../Apps/./Deep/Say.sbx
loaded, starting at 4000 loaded, starting at 5000
> run the deep one the long way round > run the deep one the long way round
Hello, World! Hello, World!
finished finished
+1 -1
View File
@@ -4,7 +4,7 @@ Folder <dir>
Edit.sbx 2243 Edit.sbx 2243
1 file, 1 directory 1 file, 1 directory
> load Edit.sbx > load Edit.sbx
loaded, starting at 4000 loaded, starting at 5000
> run note.txt > run note.txt
note.txt, new file note.txt, new file
> a > a
+1 -1
View File
@@ -1,6 +1,6 @@
CosmOS CosmOS
> load Type.sbx > load Type.sbx
loaded, starting at 4000 loaded, starting at 5000
> run readable.txt > run readable.txt
first line first line
second line second line