Put the libraries on the disk, and say which include is missing
Sieve-16.asm, Life.asm and Fib-16.asm could be read on the machine and not assembled on it. All three #Include print.asm, and print.asm was not on the disk. /LIB WAS STILL A HAND-WRITTEN LIST. Programs/Libraries is what an #Include means when it is not a CosmOS source - print, the integer helpers, the maths - and nobody had thought to name them, which is the exact failure mirroring the sources was meant to end. It is mirrored now, so the next one nobody thinks of is there anyway. AND THE ASSEMBLER SAID NOTHING USEFUL. A missing include returned a failure and printed no message, so the catch-all at the top said "nothing was written", which is true and useless - finding out why meant reading the assembler rather than the message. It names the file now, and where it looked: cannot find print.asm, not beside the file that asked and not as /Lib/print.asm Both halves are worth having, because a name that is in neither place is usually one or the other spelt wrong. The same shape as More's "error 2": a program that knows exactly what happened, reporting a number or nothing at all. The disk also depends on the recipe that lays it out now. It did not, so adding the libraries left an image built without them and the next run reported the same thing missing - which sends you looking at the change you just made rather than at the stale thing in front of you. It cost twenty minutes to notice. 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
dae3455da0
commit
4e3258e3f7
@@ -244,6 +244,26 @@ srcIncludeSkip:
|
|||||||
RET
|
RET
|
||||||
|
|
||||||
srcIncludeGone:
|
srcIncludeGone:
|
||||||
|
; ---- Say which one ----
|
||||||
|
;
|
||||||
|
; It said nothing at all, and the assembler's catch-all then said "nothing was written" -
|
||||||
|
; which is true and useless. Three programs on the disk could be read and not assembled,
|
||||||
|
; and finding out why meant reading the assembler rather than the message.
|
||||||
|
;
|
||||||
|
; SrcName holds the library path by now, because that was the second place tried, so this
|
||||||
|
; says where it looked as well as what for. Both are worth having: a name that is not in
|
||||||
|
; /Lib and not beside you is usually one or the other spelt wrong.
|
||||||
|
SETD.0 GoneText
|
||||||
|
SWI osPrintString
|
||||||
|
SETD.0 IncWanted
|
||||||
|
SWI osPrintString
|
||||||
|
SETD.0 GoneWhereText
|
||||||
|
SWI osPrintString
|
||||||
|
SETD.0 SrcName
|
||||||
|
SWI osPrintString
|
||||||
|
SETD.0 GoneEndText
|
||||||
|
SWI osPrintString
|
||||||
|
|
||||||
; The file is not there. The stack is left as it is: the caller stops the assembly, and
|
; The file is not there. The stack is left as it is: the caller stops the assembly, and
|
||||||
; unwinding for the sake of tidiness would only hide where it happened.
|
; unwinding for the sake of tidiness would only hide where it happened.
|
||||||
RSTA
|
RSTA
|
||||||
@@ -596,6 +616,13 @@ IncSlot:
|
|||||||
IncSlotLeft:
|
IncSlotLeft:
|
||||||
0x00
|
0x00
|
||||||
|
|
||||||
|
GoneText:
|
||||||
|
"cannot find "
|
||||||
|
GoneWhereText:
|
||||||
|
", not beside the file that asked and not as "
|
||||||
|
GoneEndText:
|
||||||
|
"
|
||||||
|
"
|
||||||
TooDeepText:
|
TooDeepText:
|
||||||
"included files are nested deeper than this assembler will follow
|
"included files are nested deeper than this assembler will follow
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -129,6 +129,13 @@ cosmos: $(COSMOS) $(APPS) $(NATIVE_ASM)
|
|||||||
# blocks of four thousand and ninety six - three tenths of one per cent - to buy a hundred
|
# blocks of four thousand and ninety six - three tenths of one per cent - to buy a hundred
|
||||||
# and twenty eight more names. The superblock has carried this number per disk since the
|
# and twenty eight more names. The superblock has carried this number per disk since the
|
||||||
# format was written, so nothing but this line knows what it is.
|
# format was written, so nothing but this line knows what it is.
|
||||||
|
# ---- And on the recipe that lays it out ----
|
||||||
|
#
|
||||||
|
# Changing HOW the disk is built has to rebuild the disk. It did not, so adding the libraries
|
||||||
|
# to /Lib left an image that had been made without them, and the next run said the same thing
|
||||||
|
# was still missing - which sends you looking at the change you just made rather than at the
|
||||||
|
# stale thing in front of you.
|
||||||
|
$(COSMOS_DISK): makefile
|
||||||
$(COSMOS_DISK): $(APPS) $(NATIVE_ASM) $(COSMOS) $(STAGE2) testPrograms/stringKeyword.asm \
|
$(COSMOS_DISK): $(APPS) $(NATIVE_ASM) $(COSMOS) $(STAGE2) testPrograms/stringKeyword.asm \
|
||||||
$(wildcard CosmOS/Apps/*.asm) \
|
$(wildcard CosmOS/Apps/*.asm) \
|
||||||
$(wildcard CosmOS/Source/*.asm) $(wildcard CosmOS/Assembler/*.asm)
|
$(wildcard CosmOS/Source/*.asm) $(wildcard CosmOS/Assembler/*.asm)
|
||||||
@@ -190,6 +197,14 @@ $(COSMOS_DISK): $(APPS) $(NATIVE_ASM) $(COSMOS) $(STAGE2) testPrograms/stringKey
|
|||||||
@# with a name longer than a directory entry holds is refused rather than skipped: a
|
@# with a name longer than a directory entry holds is refused rather than skipped: a
|
||||||
@# disk quietly missing a file is the failure a mirror exists to prevent.
|
@# disk quietly missing a file is the failure a mirror exists to prevent.
|
||||||
$(DISKTOOL) mirror $@ . /Source build
|
$(DISKTOOL) mirror $@ . /Source build
|
||||||
|
@# ---- And the libraries proper ----
|
||||||
|
@#
|
||||||
|
@# Programs/Libraries is what an #Include means when it is not a CosmOS source: print,
|
||||||
|
@# the integer helpers, the maths. They were never here, because /Lib was a hand-written
|
||||||
|
@# list and nobody thought of them - so Sieve-16.asm, Life.asm and Fib-16.asm could be
|
||||||
|
@# read on the machine and not assembled on it, and the assembler said only "nothing was
|
||||||
|
@# written". Mirrored, so that the next one nobody thinks of is here anyway.
|
||||||
|
$(DISKTOOL) mirror $@ Libraries /Lib
|
||||||
@for f in CosmOS/Source/console.asm CosmOS/Source/fileStream.asm \
|
@for f in CosmOS/Source/console.asm CosmOS/Source/fileStream.asm \
|
||||||
CosmOS/Source/sbfs.asm CosmOS/Source/services.asm CosmOS/Source/text.asm \
|
CosmOS/Source/sbfs.asm CosmOS/Source/services.asm CosmOS/Source/text.asm \
|
||||||
CosmOS/Source/config.asm \
|
CosmOS/Source/config.asm \
|
||||||
|
|||||||
Reference in New Issue
Block a user