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
31 lines
805 B
Plaintext
31 lines
805 B
Plaintext
CosmOS
|
|
> load readTest.sbx
|
|
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.
|
|
|
|
#Program
|
|
|
|
Start:
|
|
LDA ; Load a byte of the string into A.
|
|
BRA End ; If A is zero, branch out of the loop.
|
|
OUTA 0x00 ; Output the value in A to Port 0, the text console.
|
|
INCD ; Increment the Data Pointer to the next byte of the string.
|
|
BRI Start ; Branch immediately to the start of the loop.
|
|
|
|
End:
|
|
INIA 0x0A ; We'll load a linefeed into A and output it to make it look nice.
|
|
OUTA 0x00 ; Output it to the text console.
|
|
HALT ; Terminate the program.
|
|
|
|
#Data
|
|
|
|
"Hello, World!"
|
|
---- lines: 21
|
|
finished
|
|
> exit
|
|
halted
|
|
Execution halted.
|
|
[exit 0]
|