Files
SplitBit-Emulator/Tests/expected/cosmosMonitor.out
T
Anachronaut e1273337c4 Two mechanical fixes SplitLint found: MVQA, and RSTA for zero
Twenty four places moved Q into A or B by pushing it and popping it back.
That is four bus cycles and two bytes to do what MVQA does in one of each,
and several of them are inside loops - Life, the calculator, int8. Nineteen
more loaded zero with INIA 0d0 where RSTA says the same thing in one byte.

Both are equivalent at the CPU rather than by assertion: RSTA and INIA both
leave Status alone, and PSHQ followed by POPA nets to A = Q with the Stack
Pointer where it started. The one difference is that the pair leaves a copy
of Q in memory just below the Stack Pointer and MVQA does not, which
nothing here reads.

Five recorded outputs moved and every one of them says the change worked:

- 16x16Life fits five more generations into the same cycle budget, the
  first 457 lines identical, because the loop got cheaper.
- Life.sbx is 1409 bytes rather than 1411, in three tests that list it.
- Edit.sbx is 1995 rather than 1996.

That last one broke a check I added this morning, and the hole is worth
recording: the CosmOS README's claim about Edit's size did not have the
word "Edit" on the same line as the number, because the subject was in the
sentence before, so the check that measures quoted sizes skipped it
silently. The sentence now names what it is talking about, which makes it
both checkable and clearer, and the check fails on a wrong number there.

Comments on either half of a replaced pair are carried onto the
instruction that replaces them, so nothing anybody wrote was lost.
2026-08-26 17:53:10 -04:00

75 lines
2.3 KiB
Plaintext

CosmOS
> x examine, d disassemble, a assemble, s set, b bank, g go, exit leaves
* b <program|data|number>
* there is no such bank
* loaded, starting at 4000
* bank 00
* 4000 47 00 20 00 SETD.0 2000
4004 18 10 SWI 10
4006 47 00 20 44 SETD.0 2044
400A 18 10 SWI 10
400C 47 00 20 7A SETD.0 207A
4010 27 1F INIB 1F
4012 18 11 SWI 11
4014 47 00 20 5D SETD.0 205D
* 4000 47 00 20 00 18 10 47 00 20 44 18 10 47 00 20 7A G. ...G. D..G. z
4010 27 1F 18 11 47 00 20 5D 18 10 47 00 20 7A 18 10 '...G. ]..G. z..
4020 47 00 20 65 18 10 18 12 00 00 00 00 00 00 00 00 G. e............
4030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
* bank 01
* 2000 61 20 70 72 6F 67 72 61 6D 2C 20 6C 6F 61 64 65 a program, loade
2010 64 20 6F 66 66 20 61 20 64 69 73 6B 2C 20 72 75 d off a disk, ru
2020 6E 6E 69 6E 67 20 6F 6E 20 74 68 65 20 73 79 73 nning on the sys
2030 74 65 6D 20 74 68 61 74 20 6C 6F 61 64 65 64 20 tem that loaded
* bank 02
* 0000 01 FF 00 00 00 00 00 00 01 FF 00 00 00 00 00 00 ................
0010 03 FF 08 00 00 00 00 00 01 20 01 00 00 00 00 00 ......... ......
0020 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 ................
0030 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 ................
* that bank will not be written
* bank 00
* * 8000 26 48 INIA 48
8002 D1 00 OUTA 00
8004 26 0A INIA 0A
8006 D1 00 OUTA 00
8008 18 12 SWI 12
800A 00 ADD
800B 00 ADD
800C 00 ADD
* H
finished
* 8000 26 48 INIA 48
8002 D1 00 OUTA 00
8004 26 0A INIA 0A
8006 D1 00 OUTA 00
8008 18 12 SWI 12
800A 00 ADD
800B 00 ADD
800C 00 ADD
* bank 01
* * bank 00
* 8200: 8204: 8206: 8208: 820B: no such instruction
820B: that one needs a value after it
820B: 820D: * 8200 47 00 81 00 SETD.0 8100
8204 18 10 SWI 10
8206 42 02 LDA.2
8208 4A 00 01 LDD.0.1
820B 18 12 SWI 12
820D 00 ADD
820E 00 ADD
820F 00 ADD
* hello, typed
finished
* > greet.sbx 210
hello.sbx 52
Life.sbx 1409
Snake.sbx 2175
Keys.sbx 663
Say.sbx 155
Break.sbx 148
notes.txt 21
8 files
> halted
Execution halted.
[exit 0]