D5: move in, and give the assembler somewhere to look
The demo disk is three directories instead of thirty nine names in one list with cosmos.asm sitting between fileStream.asm and sbfs.asm: /Apps what you run /Source what you name to the assembler /Lib what those include The split is by ROLE rather than by which directory the host keeps a file in. Everything in /Lib is named by an #Include somewhere and by nothing else, which is what makes it a library rather than a source. THAT LAYOUT WAS NOT POSSIBLE UNTIL NOW, and finding out why is what this rung actually cost. An include on the machine was a bare name resolved where you stood, so every source that calls a service had to sit in the same directory as services.asm - which is every source worth having. The first arrangement of this disk put the examples in a directory of their own and none of them would assemble. So the native assembler has a search path: beside you, then /Lib. The same rule the shell already uses for a program it does not recognise, applied to the thing that reads source, and the same reasoning for it being two fixed places rather than a list - a list needs somewhere to live between one boot and the next, and there is no such place yet. It also brings the native assembler nearer the host one, which has searched -I directories since before there was a machine to run this on. The reader's per-file state grew from 293 bytes to 301, because the name it keeps is a path now and every block of a file is asked for by it. Six of those would no longer fit the room set aside, so the include list moved up a page. Both numbers are written down in two places on purpose and both were changed. dir said cosmos.asm was 17,460 bytes. It is 82,996. The size came out of the block count's LOW BYTE shifted up and the tail beneath it, which is sixteen bits, so anything from 256 blocks upward came back as itself less 65,536 - a plausible number, and wrong. Files that big say their size in blocks now. Printing the true figure wants decimal printing twenty four bits wide, which is a page of console.asm to say something nobody reads more precisely than "big". The Assembler Manual's line about SBFS being flat was the last thing in the repository still claiming it, and docs.sh now looks for that phrase and three like it in all four documents. Not a section that is wrong - one clause inside a paragraph that is otherwise right, which is the shape this kind of staleness takes. The duplicate puts are gone with the wildcard that caused them, so building the disk is quiet. 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
da91a36d92
commit
06bdbf7728
@@ -430,6 +430,24 @@ for heading in ["## An Example SplitBit Assembly Program:",
|
||||
problems.append("the example under \"%s\" no longer assembles"
|
||||
% heading.strip("# :"))
|
||||
|
||||
# ---- No manual still says the filesystem is flat ----
|
||||
#
|
||||
# It was flat, and every manual said so in passing, and those sentences went on being true
|
||||
# for as long as nobody looked. SBFS grew directories over five separate pieces of work and
|
||||
# the last thing left claiming otherwise was one line in the Assembler Manual explaining
|
||||
# why an include had nowhere else to look.
|
||||
#
|
||||
# A phrase rather than a section, because that is the shape this kind of staleness takes:
|
||||
# not a chapter that is wrong, one clause inside a paragraph that is otherwise right.
|
||||
for name, text in (("the Programming Manual", pm), ("the Assembler Manual", am),
|
||||
("the README", open("README.md").read()),
|
||||
("the CosmOS README", open("Programs/CosmOS/README.md").read())):
|
||||
for claim in ("SBFS is flat", "the filesystem is flat", "flat filesystem",
|
||||
"SBFS has no directories"):
|
||||
if claim.lower() in text.lower():
|
||||
problems.append("%s still says \"%s\", and it has not been true since"
|
||||
" directories arrived" % (name, claim))
|
||||
|
||||
# ---- CosmOS fits in the half of the machine it says it does ----
|
||||
#
|
||||
# The memory map in the CosmOS README is a CONVENTION. Nothing in the assembler, the
|
||||
|
||||
@@ -3,11 +3,11 @@ CosmOS
|
||||
> two stops, and what the registers were at each
|
||||
break at 400E
|
||||
A 11 B 22 Q 00 status 00
|
||||
DP0 2030 DP1 09BC DP2 0000 DP3 4000 SP FFFF
|
||||
DP0 2030 DP1 09C4 DP2 0000 DP3 4000 SP FFFF
|
||||
press a key
|
||||
break at 4023
|
||||
A 44 B 55 Q 00 status 00
|
||||
DP0 2000 DP1 09BC DP2 0000 DP3 4000 SP FFF5
|
||||
DP0 2000 DP1 09C4 DP2 0000 DP3 4000 SP FFF5
|
||||
press a key
|
||||
carried on to the end
|
||||
finished
|
||||
|
||||
Reference in New Issue
Block a user