The C assembler names its output for the format, not always .bin

It always wrote .bin, whatever it had built. So assembling a loadable
program without -o produced Say.bin containing SBEX - a boot image name on a
file the machine cannot boot, in a repository whose whole convention is that
a .bin is started from and a .sbx is loaded.

    Successfully wrote SplitBit boot image to "hello.bin".
    Successfully wrote SplitBit loadable program to "Say.sbx".

programIsLoadable() already existed and is already what decides which
writer runs; the name now asks it too. Nothing in the build depended on the
old behaviour, because everything that assembles anything passes -o.

THE ASSEMBLER THAT RUNS ON SPLITBIT ALREADY DID IT THIS WAY. Two assemblers
naming their output differently from the same source is exactly the kind of
difference that wastes an afternoon, and the newer one was right.

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:54:51 -04:00
co-authored by Claude Opus 5
parent b6004bdcde
commit f4bc587d0a
3 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ If the CPU reads a byte that is not an instruction, it goes to the fault handler
| `-M <file>` | Write out which source files the output depends on, as a make rule. |
| `-h`, `--help` | Show help and usage information. |
Without `-o` the output takes the source file's name with a `.bin` extension, in the directory you called the assembler from. Included files are looked for beside the file that includes them, and then along the directories given with `-I`.
Without `-o` the output takes the source file's name, in the directory you called the assembler from, with the extension the format asks for: `.bin` for a boot image and `.sbx` for a loadable program. Included files are looked for beside the file that includes them, and then along the directories given with `-I`.
## Managing Disks: SplitDisk