Grid took the disk's bank number, and gave the screen back untidy
Found by playing with it: after running Grid, the shell could not start anything by name and dir said the disk was empty. Several commands after the program that did it had exited, and nothing had said a word. BANK NUMBERS ARE ONE NAMESPACE FOR THE WHOLE MACHINE. Grid registered video memory as bank 3, which is the number CosmOS gives the disk's buffer when it mounts - and that does not fail, it succeeds. Every read the filesystem made afterwards came out of video memory. Grid uses 4 now, and the CosmOS README has a table of who owns what, because the one place this was written down was a line in a service description about sbfsMount. Nothing hands bank numbers out and nothing refuses one that is taken. If programs start wanting banks routinely, a service that allocates them is what should exist rather than a longer table - noted there rather than built, since one program wanting one bank is not yet a system. Also puts the cursor home on the way out. The map was emptied and the console was not told, so the shell carried on writing from wherever the cursor had been standing when Grid started - twelve rows down a screen with nothing on it. Clearing is what homes a cursor and it costs one write. The regression test runs a program by name, then Grid, then the same program again; the second one is the check. Putting Grid back on bank 3 fails it. 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
1aa45fcfc4
commit
3b650cabcd
@@ -791,6 +791,17 @@ cosmosStartup | CosmOS/Source/cosmos.asm | run | cosmosSta
|
||||
# Present, and not a script. A missing one is ordinary and says nothing; one somebody meant
|
||||
# to run and got wrong is worth a word.
|
||||
cosmosStartupBad | CosmOS/Source/cosmos.asm | run | cosmosStartup.in | 200000000 | disks/startupbad.img
|
||||
# ---- A program that takes the screen, and gives the disk back ----
|
||||
#
|
||||
# Grid registers video memory as a bank, and bank numbers are one namespace for the whole
|
||||
# machine with nothing handing them out. It asked for 3, which is the one CosmOS gives the
|
||||
# disk's buffer at mount - and that does not fail, it SUCCEEDS: every read the filesystem
|
||||
# made afterwards came out of video memory. The shell found an empty disk and could not
|
||||
# start anything by name, and nothing said a word.
|
||||
#
|
||||
# So this runs a program by name, then Grid, then the same program again. The second one is
|
||||
# the check. dir at the end says the disk is still there to be read.
|
||||
cosmosGrid | CosmOS/Source/cosmos.asm | run | cosmosGrid.in | 60000000 | disks/cosmos.img
|
||||
printDecimalTest | testPrograms/printDecimalTest.asm | xfail | - | -
|
||||
printDigitTest | testPrograms/printDigitTest.asm | xfail | - | -
|
||||
printHexTest | testPrograms/printHexTest.asm | xfail | - | -
|
||||
|
||||
Reference in New Issue
Block a user