diff --git a/Programs/Examples/tune.asm b/Programs/Examples/tune.asm
index 59ddcec..44d9f88 100644
--- a/Programs/Examples/tune.asm
+++ b/Programs/Examples/tune.asm
@@ -35,8 +35,12 @@
; that the inner loop is two: the note, and letting go of it. That split is what the selector
; and value registers are for - see Making A Noise in the Programming Manual.
+#Include services.asm
+
#Program
+ #Base 0x5000
+
start:
; ---- The instrument ----
@@ -182,7 +186,7 @@ lastRing:
CIF
RSTA
OUTA 0x35
- HALT
+ SWI osExit
; Sixty times a second, and it has nothing to do. WAIT only needs something to have happened,
; and this is the something. A handler still has to exist: an interrupt with nothing installed
@@ -192,6 +196,8 @@ frame:
#Data
+ #Base 0x3000
+
; ---- Notes and how long they last ----
;
; Pairs: a MIDI note, then a count of frames. 60 is middle C and every 12 is an octave. A zero
diff --git a/Tests/expected/cosmosCrossDisk.out b/Tests/expected/cosmosCrossDisk.out
index 4c4a5bd..a935c79 100644
--- a/Tests/expected/cosmosCrossDisk.out
+++ b/Tests/expected/cosmosCrossDisk.out
@@ -23,6 +23,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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.
diff --git a/Tests/expected/cosmosDrives.out b/Tests/expected/cosmosDrives.out
index 8885ef3..21fd2b1 100644
--- a/Tests/expected/cosmosDrives.out
+++ b/Tests/expected/cosmosDrives.out
@@ -13,6 +13,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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
diff --git a/Tests/expected/cosmosFault.out b/Tests/expected/cosmosFault.out
index 90d8634..586c052 100644
--- a/Tests/expected/cosmosFault.out
+++ b/Tests/expected/cosmosFault.out
@@ -30,6 +30,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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.
diff --git a/Tests/expected/cosmosGrid.out b/Tests/expected/cosmosGrid.out
index 40fe56b..ab00e8a 100644
--- a/Tests/expected/cosmosGrid.out
+++ b/Tests/expected/cosmosGrid.out
@@ -20,6 +20,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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.
diff --git a/Tests/expected/cosmosMonitor.out b/Tests/expected/cosmosMonitor.out
index 38d53ab..b521dd1 100644
--- a/Tests/expected/cosmosMonitor.out
+++ b/Tests/expected/cosmosMonitor.out
@@ -106,6 +106,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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.
diff --git a/Tests/expected/cosmosMonitorRun.out b/Tests/expected/cosmosMonitorRun.out
index 90b821c..a932ae9 100644
--- a/Tests/expected/cosmosMonitorRun.out
+++ b/Tests/expected/cosmosMonitorRun.out
@@ -25,6 +25,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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.
diff --git a/Tests/expected/cosmosRun.out b/Tests/expected/cosmosRun.out
index 34b855e..b3462c2 100644
--- a/Tests/expected/cosmosRun.out
+++ b/Tests/expected/cosmosRun.out
@@ -13,6 +13,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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
diff --git a/Tests/expected/cosmosSlowDisk.out b/Tests/expected/cosmosSlowDisk.out
index da7f5ff..b5d863b 100644
--- a/Tests/expected/cosmosSlowDisk.out
+++ b/Tests/expected/cosmosSlowDisk.out
@@ -11,6 +11,7 @@ Grid.sbx 559
Press.sbx 872
Mode.sbx 48
Crash.sbx 632
+tune.sbx 306
notes.txt 21
Apps
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
diff --git a/Tests/expected/tune.out b/Tests/expected/tune.out
index 6062395..a90c5b3 100644
--- a/Tests/expected/tune.out
+++ b/Tests/expected/tune.out
@@ -1,2 +1,7 @@
+CosmOS
+> tune
+finished
+> exit
+halted
Execution halted.
[exit 0]
diff --git a/Tests/input/tune.in b/Tests/input/tune.in
new file mode 100644
index 0000000..be7c59d
--- /dev/null
+++ b/Tests/input/tune.in
@@ -0,0 +1,2 @@
+tune
+exit
diff --git a/Tests/makedisks.sh b/Tests/makedisks.sh
index a7b1bcb..f38feba 100755
--- a/Tests/makedisks.sh
+++ b/Tests/makedisks.sh
@@ -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
diff --git a/Tests/manifest b/Tests/manifest
index f26d7a7..462f18c 100644
--- a/Tests/manifest
+++ b/Tests/manifest
@@ -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