Give the Programming Manual a title, and send the boot image format away

Last of the four. What was left after the reorder was a document whose first
heading was "General Description" doing a part title's job without being
one, and a section called "Input and Output In the Emulator" that held two
console ports, a worked program, and a file format.

  A title and an opening that says what this document is FOR, and what the
  other two are for, so a reader who wants the operating system or the
  language knows immediately they are in the wrong file.

  "General Description" is "The Machine", which matches the three part
  headings the reorder gave the rest.

  "Input and Output In the Emulator" is "Making It Print Something", which
  is what the section is: port 0, and the shortest program that uses it.

THE BOOT IMAGE FORMAT MOVES TO THE ASSEMBLER MANUAL, beside the loadable
program format, for the reason SBEX went there: it is a thing the assembler
WRITES. It is fair that the emulator reads them too - both tools speak it,
the way SplitDisk and sbfs.asm both speak the filesystem - but only one of
them makes one.

And it is called a boot image now, in the text as well as the heading. That
is what this project has been calling these files for a while; the manual
was still saying "binary", which now means either kind of output file and so
means neither.

A CHECK THAT GOT BETTER BY BEING SPLIT. The hello world program and the hex
dump of it were both in the Programming Manual, and docs.sh compared them
with each other and with the assembler. The program stays with the machine,
where the reorder put it just after the instruction list; the dump goes with
the format it demonstrates. So the check now settles THREE things against
each other: what one manual prints, what the other prints, and what the
assembler actually makes. Verified both ways - a wrong byte in the dump, and
the anchor renamed.

The manual is 692 lines and four parts. It was 1,116 lines and nineteen flat
sections when this started.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-21 14:44:11 -04:00
co-authored by Claude Opus 5
parent e594f44cce
commit 306b4dce92
3 changed files with 67 additions and 47 deletions
+8 -3
View File
@@ -351,17 +351,22 @@ import tempfile
# says what it could not find; these two were the exception, and a rename here produced an
# IndexError and a traceback instead of a sentence. That is a worse answer than a stale
# manual, because whoever reads it learns nothing about which heading moved.
# THE TWO HALVES ARE IN DIFFERENT MANUALS NOW, and that makes this a better check than it
# was. The program belongs with the machine, where it arrives just after the instruction
# list; the hex dump belongs with the boot image format it is an example of, which is the
# assembler's business. So this settles three things against each other at once: what the
# Programming Manual prints, what the Assembler Manual prints, and what the assembler does.
exampleAnchor = "### Example Program: Hello World"
dumpAnchor = "assembled and dumped as hex:"
if exampleAnchor not in pm:
problems.append("the Programming Manual has lost its \"Example Program: Hello World\""
" heading, so the worked example cannot be found")
elif dumpAnchor not in pm:
problems.append("the Programming Manual no longer says \"%s\" before the hex dump, so"
elif dumpAnchor not in am:
problems.append("the Assembler Manual no longer says \"%s\" before the hex dump, so"
" there is nothing to compare the worked example against" % dumpAnchor)
else:
source = pm.split(exampleAnchor)[1].split("```")[1]
claimed = pm.split(dumpAnchor)[1].split("```")[1].split()
claimed = am.split(dumpAnchor)[1].split("```")[1].split()
with tempfile.TemporaryDirectory() as work:
asm = os.path.join(work, "hello.asm")
binary = os.path.join(work, "hello.bin")