Sorry, that might have come across a bit rude, my apologies. Still it is unfortunate to have bugs linger.
In the meantime, while the test script I posted above is helpful to verify the CPU emulator, students will be better served with a corresponding test for their hardware. Here is a patch (in unified diff format) that adds one to CPU.tst and CPU.cmp of project 5.
cpu-dest-tst.diff:
diff -u old/CPU.cmp new/CPU.cmp
--- old/CPU.cmp Mon Oct 10 19:13:26 2022
+++ new/CPU.cmp Mon Oct 10 19:13:47 2022
@@ -91,7 +91,9 @@
|45 | 11111|1110001100000110| 0 |*******| 0 | 1000| 1001| 1 |
|45+ | 11111|1110001100000111| 0 |*******| 0 | 1000| 1001| 1 |
|46 | 11111|1110001100000111| 0 |*******| 0 | 1000| 1000| 1 |
-|46+ | 11111|1110001100000111| 1 |*******| 0 | 1000| 1000| 1 |
-|47 | 11111|1110001100000111| 1 |*******| 0 | 1000| 0| 1 |
-|47+ | 11111|0111111111111111| 0 |*******| 0 | 1000| 0| 1 |
-|48 | 11111|0111111111111111| 0 |*******| 0 |32767| 1| 1 |
+|46+ | 11111|1110101010100111| 0 |*******| 0 | 1000| 1000| 1 |
+|47 | 11111|1110101010100111| 0 |*******| 0 | 0| 1000| 1 |
+|47+ | 11111|1110101010100111| 1 |*******| 0 | 0| 1000| 1 |
+|48 | 11111|1110101010100111| 1 |*******| 0 | 0| 0| 1 |
+|48+ | 11111|0111111111111111| 0 |*******| 0 | 0| 0| 1 |
+|49 | 11111|0111111111111111| 0 |*******| 0 |32767| 1| 1 |
diff -u old/CPU.tst new/CPU.tst
--- old/CPU.tst Mon Oct 10 19:13:26 2022
+++ new/CPU.tst Mon Oct 10 19:13:47 2022
@@ -148,6 +148,9 @@
set instruction %B1110001100000111, // D;JMP
tick, output, tock, output;
+set instruction %B1110101010100111, // A=0;JMP
+tick, output, tock, output;
+
set reset 1;
tick, output, tock, output;
PS: The reason I stumbled across this bug is because I made the same mistake in my own implementation of a Hack emulator, which I might make a separate post about. After fixing it, it occured to me to test the "official" emulator, because the bug
is subtle. And here we are. :)