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:
co-authored by
Claude Opus 5
parent
f97d15de08
commit
3449405b18
@@ -1,15 +1,15 @@
|
||||
CosmOS
|
||||
> load Break.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
two stops, and what the registers were at each
|
||||
break at 4016
|
||||
break at 5016
|
||||
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
|
||||
break at 4034
|
||||
break at 5034
|
||||
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
|
||||
carried on to the end
|
||||
finished
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Edit.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run poem.txt
|
||||
poem.txt, new file
|
||||
> a
|
||||
|
||||
@@ -2,7 +2,7 @@ CosmOS
|
||||
> echo remembered by the shell
|
||||
remembered by the shell
|
||||
> load Edit.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run typed.txt
|
||||
typed.txt, new file
|
||||
> a
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
CosmOS
|
||||
> Crash opcode
|
||||
that byte is not an instruction, at 4081
|
||||
that byte is not an instruction, at 5081
|
||||
A 00 B 0F Q 00
|
||||
the program was stopped
|
||||
> Crash service
|
||||
nothing is installed at service 28, at 4084
|
||||
nothing is installed at service 28, at 5084
|
||||
A 00 B 0F Q 00
|
||||
the program was stopped
|
||||
> 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
|
||||
the program was stopped
|
||||
> 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
|
||||
the program was stopped
|
||||
> Crash sideways
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load hello.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
Hello, World!
|
||||
finished
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Keys.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
keys, by interrupt. q stops.
|
||||
ab
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Life.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
[2J[H[1;1H #
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Life.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
[2J[H[1;1H #
|
||||
#
|
||||
|
||||
@@ -6,30 +6,30 @@ b <program|data|number>
|
||||
* b 9
|
||||
there is no such bank
|
||||
* load greet.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
* 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
|
||||
400C 47 00 20 7A SETD.0 207A
|
||||
4010 27 1F INIB 1F
|
||||
4012 72 11 SWI 11
|
||||
4014 47 00 20 5D SETD.0 205D
|
||||
4000 00 ?
|
||||
4001 00 ?
|
||||
4002 00 ?
|
||||
4003 00 ?
|
||||
4004 00 ?
|
||||
4005 00 ?
|
||||
4006 00 ?
|
||||
4007 00 ?
|
||||
* 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........
|
||||
4000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
4010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
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 ................
|
||||
* 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
|
||||
2000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
2010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
2020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
2030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
* b 2
|
||||
bank 02
|
||||
* x 0
|
||||
|
||||
@@ -5,7 +5,7 @@ x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
|
||||
it says: hello from the monitor
|
||||
finished
|
||||
* Crash opcode
|
||||
that byte is not an instruction, at 4081
|
||||
that byte is not an instruction, at 5081
|
||||
A 00 B 0F Q 00
|
||||
the program was stopped
|
||||
* nonsense
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load More.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run readable.txt
|
||||
first line
|
||||
second line
|
||||
|
||||
@@ -31,7 +31,7 @@ no such file
|
||||
> load notes.txt
|
||||
not a program
|
||||
> load greet.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
a program, loaded off a disk, running on the system that loaded it
|
||||
what should I call you? Anachronaut
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
nothing was said
|
||||
finished
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Files.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
saved it
|
||||
read it back, 22 bytes:
|
||||
|
||||
@@ -23,7 +23,7 @@ inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
> load Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run the disk took its time
|
||||
it says: the disk took its time
|
||||
finished
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Snake.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
[2J[H[1;1H+----------------+
|
||||
| |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load readTest.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> 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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Stream.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run
|
||||
big.txt is 329 blocks
|
||||
read 329 blocks, checksum 57368, stopped with 3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load tokenTest.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run hello.asm
|
||||
4 keyword 0 [#Program]
|
||||
6 label: 0 [Start:]
|
||||
|
||||
@@ -4,22 +4,22 @@ Apps <dir>
|
||||
rooted.txt 21
|
||||
1 file, 1 directory
|
||||
> load /Apps/Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run the shallow one
|
||||
it says: the shallow one
|
||||
finished
|
||||
> load /Apps/Deep/Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run the deep one
|
||||
Hello, World!
|
||||
finished
|
||||
> load /Apps/./Deep/../Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run the shallow one again
|
||||
it says: the shallow one again
|
||||
finished
|
||||
> load /Apps/Deep/../../Apps/./Deep/Say.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run the deep one the long way round
|
||||
Hello, World!
|
||||
finished
|
||||
|
||||
@@ -4,7 +4,7 @@ Folder <dir>
|
||||
Edit.sbx 2243
|
||||
1 file, 1 directory
|
||||
> load Edit.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run note.txt
|
||||
note.txt, new file
|
||||
> a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CosmOS
|
||||
> load Type.sbx
|
||||
loaded, starting at 4000
|
||||
loaded, starting at 5000
|
||||
> run readable.txt
|
||||
first line
|
||||
second line
|
||||
|
||||
Reference in New Issue
Block a user