Finish making the tune a program
The user's conversion, which I reverted while I was working out whether it was half done or broken. It was half done: an sbx application wants its #Include above #Program, because services.asm ends in a #Vectors block and a #Base written after that has no segment to be the base of. So the include moves up, the bases move a page with everything else, and the test starts it from the shell instead of booting it. It plays for 9,469,987 cycles, 9,423,527 of them waiting, which is the same 567 frames of music it played as a boot image. BEING A PROGRAM MEANS ITS VECTOR IS THE SYSTEM'S TO INSTALL. It brings the screen's, so that it has a beat to play to, and CosmOS puts it in when the tune starts and takes it back out when it stops - a thing a boot image never had to have right, and the second program here to exercise the version two format at all. 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
3449405b18
commit
b04e4b7d1c
@@ -23,6 +23,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -34,7 +35,7 @@ outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
crossed.txt 560
|
||||
21 files, 1 directory
|
||||
22 files, 1 directory
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
|
||||
@@ -13,6 +13,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -23,7 +24,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> drive 1
|
||||
> dir
|
||||
other.txt 28
|
||||
|
||||
@@ -30,6 +30,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -40,7 +41,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
|
||||
@@ -20,6 +20,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -30,7 +31,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
|
||||
@@ -106,6 +106,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -116,7 +117,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
|
||||
@@ -25,6 +25,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -35,7 +36,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
|
||||
@@ -13,6 +13,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -23,7 +24,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> load
|
||||
load what?
|
||||
> load nosuch.sbx
|
||||
|
||||
@@ -11,6 +11,7 @@ Grid.sbx 559
|
||||
Press.sbx 872
|
||||
Mode.sbx 48
|
||||
Crash.sbx 632
|
||||
tune.sbx 306
|
||||
notes.txt 21
|
||||
Apps <dir>
|
||||
hi.script 121
|
||||
@@ -21,7 +22,7 @@ nonl.script 38
|
||||
outer.script 376
|
||||
inner.script 44
|
||||
loop.script 35
|
||||
20 files, 1 directory
|
||||
21 files, 1 directory
|
||||
> load Say.sbx
|
||||
loaded, starting at 5000
|
||||
> run the disk took its time
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
CosmOS
|
||||
> tune
|
||||
finished
|
||||
> exit
|
||||
halted
|
||||
Execution halted.
|
||||
[exit 0]
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
tune
|
||||
exit
|
||||
@@ -129,6 +129,12 @@ for i in 1 2 3 4 5 6 7 8; do "$TOOL" put "$DISKS/sbfs.img" "filler$i.txt" >/dev/
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/CosmOS/Apps/Crash.asm" -o "$WORK/Crash.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Crash.sbx" >/dev/null
|
||||
# tune.sbx, which used to be a boot image and is now a program like any other. It brings a
|
||||
# vector of its own - the screen's, so that it has a beat to play to - which makes it the
|
||||
# second thing here that the version two format exists for.
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/Examples/tune.asm" -o "$WORK/tune.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/tune.sbx" >/dev/null
|
||||
printf 'this is not a program' > notes.txt
|
||||
"$TOOL" put "$DISKS/cosmos.img" notes.txt >/dev/null
|
||||
|
||||
|
||||
+6
-1
@@ -61,7 +61,12 @@ picture | Examples/picture.asm | run | -
|
||||
# music at 16,667 cycles a frame is 9.45 million, so twelve leaves room to lengthen the tune
|
||||
# without coming back here - and a failure saying "cycle limit reached" means somebody added
|
||||
# bars, not that anything broke.
|
||||
tune | Examples/tune.asm | run | - | 12000000
|
||||
#
|
||||
# IT IS A PROGRAM NOW rather than a boot image, so the shell starts it and the machine it
|
||||
# plays on is the one somebody would really be sitting at. That also means its vector is
|
||||
# INSTALLED BY THE SYSTEM and taken back out when it stops, which is a thing a boot image
|
||||
# never had to have right.
|
||||
tune | CosmOS/Source/cosmos.asm | run | tune.in | 12000000 | disks/cosmos.img
|
||||
8bitSieve | Examples/primeSieve/8bitSieve.asm | run | - | -
|
||||
16bitSegmentedSieve | Examples/primeSieve/16bitSieve.asm | run | - | -
|
||||
# The four pointer rewrite. It emits exactly the same primes as the line above, which
|
||||
|
||||
Reference in New Issue
Block a user